Hi,
I have a requirement where I have a standalone
java program which will run daily at around 11 PM. Now my code (which runs daily at 11 PM) has following logic.
- Connect to JMS
- Start listening asynchronously on the queues. (using MessageListener)
Once I am done getting all messages I properly close / shut down all JMS connections, listeners etc.
Now here is the issue.
The other program which puts the messages on queue can start before 11 PM. So whats happening is that the messages which came before my program started , are never fetched by my code. They remain on Queue forever.
I read about durable consumers also but it looks like I have to mandatory start listening , register as durable consumer, before I can get such missed messages.
Any pointers how to handle this scenario?
Thanks
hildich