users@glassfish.java.net

Problems With Duplicate Messages ActiveMQ and Glassfish

From: <glassfish_at_javadesktop.org>
Date: Fri, 10 Sep 2010 14:08:17 PDT

I am trying to use an MDB in Glassfish 2.1.1 with an ActiveMQ broker to connect with an ActiveMQ producer client via a topic. I got it to work using activemq-rar-5.2.0 but 5.4.0 will not deploy correctly in Glassfish. However, even though it works with 5.2.0, there is a quirk where in a topic if you publish numbers to the topic and have 2 consuming MDB instances, they both get complete copies of the messages (i.e. 1-100), meaning they end up with duplicate messages.

In OpenMQ with the same set-up, the two instances will each get half of the messages (i.e. one even, one odd), so they don't get duplicate messsages.

We have OpenMQ currently and are thinking of switching to ActiveMQ but need to mirror the OpenMQ behavior. Is there a way to do this within Glassfish 2.1.1 and ActiveMQ 5.2.0?

Thanks!
[Message sent by forum member 'turtletsg']

http://forums.java.net/jive/thread.jspa?messageID=482386