Monday, December 24, 2012

Message Reliability in OSB

Message reliability is one of the features which customer look for. OSB too provides options to preserve the message. Consider a typical scenario where in proxy service reads a message from a source queue and send that message to a target queue. Once proxy service picks up the message it will try to post the message to the target queue. If for any reason the target queue is not accessible or any failure happens during posting there is a chance to loose the original message if proper steps not taken.

To ensure message reliability OSB provides transactional support while configuring  the proxy service.

As the first step create a source queue(TestQueue) and a corresponding error queue(TestErrorQueue) for the source queue


Set the delivery failure option for the source queue - TestQueue

Create a proxy service to consume the message from the TestQueue and enable the transaction parameters as follows

Create a business service to post the message to target queue( To generate error I have configured  a fictitious server and queue)

Create a message flow to route the message to business service


Now post a message to the TestQueue. Set the Redelivery limit to 2



Now on the OSB console we can see message is getting retried 2 times








Each time when the business process try to post the message to the target queue on the remote server, it will fail and the transaction will roll back the message back to the source queue.


After the retry limit is reached the message will be removed from the TestQueue and will move to the TestErrorQueue





We can see the message content in the ErrorQueue. So in any case the original message is not lost . It is preserved for further action which can be automated or manual






No comments:

Post a Comment