Retrieve a flag if it's the last message in the queue #433
Replies: 2 comments 1 reply
-
Hello @alejandro-jara I'm happy to help but can you please clarify what do you mean by loosing reference to whether that message is actually the last one? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Sorry I didn't explain myself correctly. I have a batch process that goes through a list of batches and calls the service that inserts in artemis, this process of going through the list of batches and the call to the service is executed asynchronously, therefore it lets me know which is the last batch that it decides to insert . So when listening to the messages I would need to make sure that it is the last message in the queue and not the last batch number (for example batch number 30) since they were entered non-sequentially. Is there a possibility of having a flag that indicates if the message that reaches the receiver is the last one? |
Beta Was this translation helpful? Give feedback.
-
Hi, I have implemented a receiver using your library that is listening to a queue, and with the message, I call a microservice. I need a way for the receiver to identify if it is the last message in the queue, so that it can execute a second subprocess.
Initially, I had the idea of sending a flag in the last batch to identify it, but since the message insertion is asynchronous, I lose reference to whether that message is actually the last one.
Is there a way to identify with an event in the receiver if it is the last message to process?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions