1
votes

I am using ActiveMQ broker to produce message to be consumed by WSO2 ESB JMS Inbound Endpoint. The producer produces the message with JMSXGroupID header set which I wish to use group the related messages so that they (related messages) are processed by same node.

The way it is documented for JMS is that broker would send message with JMSXGroupId set, to node that previously processed the message with same JMSXGroupId, if that node is connected. However as the WSO2 ESB uses polling based inbound endpoint, broker does not identify the connected node and sends the message to next available node which comes to poll the message.

Is there a way to configure JMS Inbound Endpoint as Event Based Inbound Endpoint instead of Polling Based Inbound Endpoint. Alternately, is there a way to configure JMSXGroupID based grouping in WSO2 ESB?

Edit --- Versions of the products used

  • WSO2 ESB : WSO2 EI 6.5.0 release

  • ActiveMQ Broker :5.15.9

1

1 Answers

1
votes

I am able to solve this using caching strategy of WSO2 ESB. The caching level was set to '1' in my JMS Inboud Endpoint configuration which means that only connection is cached. i.e.

<parameter name="transport.jms.CacheLevel">1</parameter>

When I changed this value to '3', JMS connection, session and JMS Consumer all three are cached thereby not creating a new consumer for each message.

<parameter name="transport.jms.CacheLevel">3</parameter>

This resulted in the broker identifying the consumer and doing the JMS Message Group based balancing thereby solving the issue.