In-Container P2PI Routing

As described in the previous chapter, P2PI routing is used to send data from one platform instance to another instance over the network. But there are scenarios when you want to send data from one module to another module within the same instance. To avoid network hop when sending data within the same instance, you can make use of in-container P2PI routing.

For in-container P2PI, when loading the MessageDestination don't provide the destinationPlatformInstance parameter as you are sending data to the current instance only.

Sample MessageDestination for in-container P2PI routing:

<MessageDestination>
<ValueChainId>9123</ValueChainId>
<Name>outbox/OrdersForVC200</Name>
<DestinationType>P2PI</DestinationType>
<Config>{destinationQueue: 'inbox/OrdersFromVC9123', destinationInterface: 'SimpleOrderInterface'}</Config>
</MessageDestination>