LibraryLink ToToggle FramesPrintFeedback

Configuring the Reply Destination

FUSE ESB JMS consumers determine destination of reply messages and exceptions uses a straightforward algorithm. By default, the reply destination is supplied by the message that started the exchange. If the reply destination cannot be determined from the request message, the endpoint will use a number of strategies to determine the reply destination.

You can customize how the endpoint determines the reply destination using the endpoint's configuration. You can also supply fall back values for the endpoint to use.

Consumer endpoints use the following algorithm to determine the reply destination for a message exchange:

  1. If the in message of the exchange includes a value for the JMSReplyTo property, that value is used as the reply destination.

  2. If the JMSReplyTo is not specified, the endpoint looks for a destination chooser implementation to use.

    If you have configured your endpoint with a destination chooser, the endpoint will use the destination chooser to select the reply destination.

    For more information on using destination choosers see Using a Custom Destination Chooser.

  3. If the JMSReplyTo is not specified and there is no configured destination chooser, the endpoint checks its replyDestination attribute for a destination.

    You configure a destination using a Spring bean. The recommend method to configure the destination is to configure the bean separately and refer the bean using the endpoint's replyDestination attribute as shown in Example 3.11. You can also add the bean directly to the endpoint by wrapping it in a jms:replyDestination child element.

  4. As a last resort, the endpoint will use the value of the replyDestinationName attribute to determine the reply destination.

    The replyDestinationName attribute takes a string that is used as the name of the destination to use. The binding component's default behavior when you provide a destination name is to resolve the destination using the standard JMS Session.createTopic() and Session.createTopic() methods to resolve the JMS destination.


    You can override the binding component's default behavior by providing a custom DestinationResolver implementation. See Using a Custom Destination Resolver.

Example 3.11 shows an example of configuring a consumer endpoint to use a dedicated JMS destination.