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

后端 未结 2 1681
你的背包
你的背包 2021-02-02 15:11

I\'m having a problem with the following setup:

A Java application send email msg to a JMS queue, then an MDB listening to the queue get the email msg with the onMessage

2条回答
  •  暖寄归人
    2021-02-02 16:04

    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).

提交回复
热议问题