How to limit the number of MDB instances listening to a Jboss JMS queue

不打扰是莪最后的温柔 提交于 2019-12-02 20:48:23

Try an additional acitivation config property:

@ActivationConfigProperty( propertyName = "maxSession", propertyValue = "someNumber")

where someNumber is the maximum number of instances you want.

If JBoss 4 has an option to limit the instances of a stateless session bean, one option could be to move the message processing code to this bean, and pass the incoming JMS messages to it. (IIRC any failures in the bean would also cause the JMS message to be unacknowledged so it would retry automatically).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!