Reconnecting JMS listener to JBossMQ

后端 未结 4 736
轮回少年
轮回少年 2020-12-15 09:11

We have a Java listener that reads text messages off of a queue in JBossMQ. If we have to reboot JBoss, the listener will not reconnect and start reading messages again. We

4条回答
  •  死守一世寂寞
    2020-12-15 09:21

    I'd highly recommend you use the Spring abstractions for JMS such as the MessageListenerContainer to deal with reconnection, transactions and pooling for you. You just need to supply a MessageListener and configure the MessageListenerContainer with the ConnectionFactory and the container does the rest.

提交回复
热议问题