Changing JMS Transport message headers and properties at runtime

When sending a message to JMS queue or topic through a business service, default values for several JMS Transport message headers are used. The message headers as well as the message properties can be overwritten by using a Transport Header action in a proxy service when routing to the business service.

We will use it to both define the priority of the message by setting the JMSPriority header and to pass a user-defined property myProperty with the value red.

Getting ready

For this recipe, we will use the solution of the recipe Sending a message to a JMS queue and extend it with a simple pass-through proxy service and then add a Transport Header action.

You can import the base OSB project ...

Get Oracle Service Bus 11g Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.