How to stop MDB when JBoss cannot process the message because of other system's failure

StackOverflow https://stackoverflow.com/questions/21811998

  •  12-10-2022
  •  | 
  •  

I'd like to know how to stop/start message listener when some environmental problem happens (ex. Remote Server which called by webservice is down).

In this case message listener continue trying to read message and get exception when it tries to connect webservice. It will rollback the queue retry without any break.

How can I stop or slow down message listener. I use JBoss EAP 6.

Thanks a lot.

有帮助吗?

解决方案

It seems like sleep thread some time would be best solution in my case.

Simple thread.sleep(mill) is not recommended and use @Asynchronous and Future is recommended, as far as I found through googling.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top