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
  •  | 
  •  

Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top