Skip to main content

JMS: how to set limit of active message consumers at one time

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
stewert
Offline
Joined: 2011-02-22

Hi,

how can I set the limit of at one time active message consumers in JMS (GlassFish 3.1)?

I have play around with "maxNumActiveConsumers" but without success.

I have tried to set "maxNumActiveConsumers" while creating the JMS-Resource with asadmin:

asadmin create-jms-resource --restype javax.jms.Queue --property maxNumActiveConsumers=2 jms/myApp/MyQueue

or specify the property directly in the admin GUI of glassfish. I have also tried to use "imq.autocreate.queue.maxNumActiveConsumers" instead of "maxNumActiveConsumers" as property name. All without success. If I send many messages to the MDB more as 2 MDB instances are active at the same time ... :-(

What's wrong?

Thanks,
Steffen