tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KDillon <myfakespamemaila...@gmail.com>
Subject JMSXGroupID and TomEE's JMS Connection Factory
Date Wed, 24 Aug 2016 17:40:50 GMT
I'm running into a weird issue with what I think might be the connection
factory.  I have a Spring web app that uses Spring JMS and JMSXGroupID to
process messages on the same consumer.  The Spring web app has a single
default message listener container with 5 consumer threads which ActiveMQ
sees as 5 different consumers.  When I try to group 100 messages under the
same JMSXGroupID, I would've expected to see the same consumer thread to be
processing the messages.  I ended up seeing the different consumer threads
taking turns consuming the messages.  The interesting part is that I fired
up the ActiveMQ Web Console and I looked at all the active consumers. 
ActiveMQ said that the messages all went to the same consumer.

I decided to get rid of the minutiae of my complex web app so I made a
simple Spring Boot application with Spring JMS that uses Spring's Connection
Factory but with using a connection URL of "tcp://0.0.0.0:61616".  Using
this setup, all messages go to a single consumer thread as I initially
expected it to.  I ran the Spring Boot application from my IDE's console so
it didn't live inside TomEE as a web app.

I decided to make a simple Spring JMS web app that uses the connection
factory provided by TomEE.  This test ends up having the same results as my
original web app.  I tried using an embedded broker and I achieved the
desired results of having a single consumer thread consuming all the
messages.

As a side note, my Spring web app does use XA transactions so the example
Spring Boot application I made doesn't participate.  Is there any reason why
using the TomEE connection factory would yield such results?



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/JMSXGroupID-and-TomEE-s-JMS-Connection-Factory-tp4679868.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Mime
View raw message