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