My application has multiple services and we dd not want to have multiple IBM Connections for each of the servers. So we have a separate server which interacts with MQ and internally all application services call the MQ Wrapper services to put their messages in corresponding queue. MQ Wrapper services also contains a Queue listener, which has queue name as an input to dequeue FIFO messages and process independently. The Queue listener service does the following steps.
1. Reads the message
2. Calls the application service to process the message
3. Commits the message to delete it from the queue.
The problem is on the use case when application wants to dequeue a specific message. We call MQ Wrapper service which internally does an MQ Get based on a correlation id and commits the message, and returns the message back to application. Here the problem is that, MQGet and commit are happening in the same service which interfaces with MQ. So if my application crashes, there is a risk of losing the messages altogether, as the message has been already committed as part of MQ Get wrapper service.
Is there any possible ways where we can deal with this issue ? Thanks in advance
------------------------------
Good Boy
------------------------------