Transactional In-container P2PI Routing

In addition to in-container P2PI routing, platform also supports transactional in-container P2PI routing. When this option is used, Platform will not enqueue the generated outbound message for asynchronous processing; instead it will process the message synchronously in the current database transaction and return the response message.

To enable transactional P2PI routing, you should have a valid MessageRoute and MessageDestination with transactional parameter (transactional: 'true') along with the usual destinationInterface parameter, which platform uses to process the message.

If processing is successful, an empty message will be enqueued to the response queue; otherwise an error message will be enqueued to error response queue.

Provide the rollbackOnError parameter in the MessageDestination config to rollback the entire transaction in case there is any error during processing.

Sample MessageDestination for Transactional in-container P2PI routing:

<MessageDestination>
<ValueChainId>9123</ValueChainId>
<Name>outbox/OrdersForVC200</Name>
<DestinationType>P2PI</DestinationType>
<Config>{transactional: 'true', rollbackOnError: 'true', destinationInterface: 'SimpleOrderInterface'}</Config>
</MessageDestination>


If no valid MessageRoute and MessageDestination exists for an outbound message, or if the MessageDestination config doesn't contain transactional parameter or it is set to 'false', Platform will enqueue the message as part of the regular outbound flow.