Choosing between Simple and Advanced Workflow
This section will help you understand which workflow will fit your project best.
Below are some descriptive features of the Outbound API which we recommend you consider when making your decision.
Throughput: Outbound performance depends on the amount of messages that can be transmitted per second. If this number is too low, then Outbound will not work properly which may result in the systems (OFSC and External) getting out of sync.
When Middleware receives a request with several messages, it will not receive other messages until it returns a SOAP response for the first batch.
So if Middleware takes 1 second to process each message, then OFSC will not send more than 3600 messages per hour.
For example after a routing run, the routing process generates a message for each activity it moved. If there were 10K activities in a bucket, it would send 10K messages, which would be processed in 3 hours at the rate of 1 message per second.
Batch sending: To achieve faster processing speed, OFSC sends messages in batches of 10 or more messages.
This means that if 50 messages are received by Middleware, then quickly put into queue and the response is returned in 1 second, then a single message gets sent effectively in 0.02 seconds.
Middleware internal queue: To achieve faster processing speed, Middleware can implement an internal queue.
When messages arrive at Middleware from OFSC, Middleware can quickly put messages into internal queue, then return the SOAP response to OFSC immediately. Middleware can then process messages in the queue asynchronously.
This way, 10K messages will be sent from OFSC in less than 5 minutes (assuming a batch of 50 messages is put to the queue in 1 second).
Timeouts. If the SOAP response from Middleware is not returned within 30 seconds, then OFSC considers it a connection failure, aborts the transaction, and resends the messages later.
For example, if a request contains a batch of 50 messages and each of them takes 1 second to be processed, then the whole request will never be processed – OFSC will drop the connection and resend the same messages repeatedly, until they expire in OFSC.
So Middleware must guarantee that it returns every SOAP response within 30 seconds.
Message cancellation
For messages that take very long time to be sent away, it makes sense to use the Advanced Workflow, even if the result is not relevant to OFSC. The reason behind it is that OFSC may know that a message is no longer relevant (e.g. the Activity was rescheduled and the message should be postponed/changed).
When using Advanced workflow, OFSC sends a 'drop_message' request in this case, notifying Middleware that the message no longer needs to be delivered.
This feature can reduce your expenses by canceling obsolete but costly messages and is only available in Advanced workflow.
Scenario |
Advanced workflow |
Simple workflow | Comments |
---|---|---|---|
|
✔ |
✖ |
OFSC can receive notifications of message processing result in Advanced workflow only. |
|
✔ |
✔ |
When using Simple workflow, Middleware must implement internal queue, put messages there, and return response ASAP. |
|
✔ |
✔ |
Simple workflow can be used only if processing a batch of messages takes the same amount of time as putting them to the internal queue. |
|
✔ |
✖ |
In Advanced workflow, OFSC can send a 'drop_message' command to notify Middleware that the message is obsolete. |