0 Replies Latest reply on May 6, 2016 11:58 PM by James Murtaugh

    Two threads processing message with same group id.

    James Murtaugh Newbie

      All,

       

      I am using the grouping feature.  I set the group in the mesage as follows message.setStringProperty("JMSXGroupID", confId);  Where confId is the string representation of a UUID.  I am seeing two threads processing a message for the same confId in my cluster.  Thinking I may have not configured  the group-handler properly.   I created an environment with a single node and the grouping-handler configuration as:

      <grouping-handler name="jcm-grouping-handler">

                              <type>LOCAL</type>

                              <address>jms</address>

                              <timeout>5000</timeout>

                          </grouping-handler>

      I reproduced the problem in that environment.   When this occurs there is a message that I have queued at a priority of 7 and a mesage I queued at a proirity of 5 being process by two separate threads.    This is typically in situations where the queue was empty and two separate events produce messages essentially at the same time.  My expectation was that a single MDB consumer would be selected to process messages for this group.  Does this not apply to messages queued at different priorities?   Is there a race condition when the queue is empty and two different producers place something on the queue at essentially the same time?   Is there some other configuration that is required to suppress this behavior?

       

      Thanks