How do I set the MEP when interacting with JBI?
Skip to end of metadata
Go to start of metadata

Problem

If you are using the Camel JBI integration to send a MessageExchange to another JBI component from within your Camel route, Camel uses the MEP of the underlying Camel Exchange to determine the MEP of the JBI MessageExchange. An example:

If the timer endpoint that starts the route sends a Camel exchange with an in-only MEP, the MEP for interacting with JBI will also be InOnly. Now imagine that the target JBI endpoint is in fact a servicemix-saxon xslt endpoint, that really expects an InOut MEP. This would break the Camel route above.

Solution

For this se case, you can override the MEP used from the Camel route like this, making sure that a JBI InOut MessageExchange is being used to interact with the "urn:translation:endpoint" endpoint.

Labels
  • No labels