JobConfig Message Listener API
This service allows an API consumer to run an existing JobConfig with text message input (synchronous, asynchronous) and/or text message output (synchronous).
POST /api/jobconfigs/{jobconfigId}/listener
API Details
• Synchronous:
– Text Message payload 200 OK response (response body is driven by your integration process through outmessagename)
– Text Message payload 408 Timeout response:
• Your integration process does not complete within 30 secs
• Result/output may be retrieved asynchronously after the job is complete
• Asynchronous:
– Text Message payload 202 Accepted response
– Result/output may be retrieved asynchronously after the job is complete
• Maximum payload size is 750KB
• Maximum synchronous wait time is 30 seconds
• Content-Types allowed: application/json, application/xml, text/plain
Example requests with allowed Content-Types:
POST /api/jobconfigs/1/listener?messagename=inputData&outmessagename=output HTTP/1.1 Authorization: Bearer eyJhbGciOiJIUzUxMiJ9. eyJzY29wZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfVVNFUiJdLCJpZCI6MSwiYWNjb3VudCI6MSwic Content-Type: application/json
{
"name": "value", "metric": 124
}
POST /api/jobconfigs/1/listener?messagename=inputData HTTP/1.1 Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.
eyJzY29wZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfVVNFUiJdLCJpZCI6MSwiYWNjb3VudCI6MSwic Content-Type: application/xml
<document>
<name>value</name>
<metric>124</metric>
</document>
POST /api/jobconfigs/1/listener?messagename=inputData HTTP/1.1 Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.
eyJzY29wZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfVVNFUiJdLCJpZCI6MSwiYWNjb3VudCI6MSwic Content-Type: text/plain
"Name","Metric"
"Value","124"
How to Consume the Input Message
The input message is exposed as a DJMessage data type within DataConnect.
You must initialize the DJMessage to be able to run a transformation or process within another process (that is, as a transformation step or subprocess).
Dim inputMsg as DJMessage
Set inputMsg = FindMessage("inputData") //This needs to match the "messagename" query parameter
If inputMsg is Nothing then
Set inputMsg = new DJMessage "inputData"
End If
LogMessage("INFO", inputMsg.body)
Once initialized, the message can be consumed as a Map source file or Component input message through the djmessage:///{messagename} protocol.
djmessage:///inputData
Last modified date: 12/13/2022