Acknowledge message using ID
I usually acknowledge messages explicitly using BytesXMLMessage.ackMessage() method.
This is pretty convenient, because I don't need to worry about how it is done in the implementation. However, there is one essential problem: I need to have the message object around when I want to call the ackMessage(). In my specific scenario (which may be actually very common), I extract data from the message and do some processing, and I want to acknowledge it only if everything goes without errors. I saw somewhere in Solace API documentation that it is not recommended to cache messages; in any case, keeping them around for too long is a waste of memory. Besides, under Flink environment which I am using, with all that checkpoint infrastructure, keeping Solace messages is very problematic.
Here is my question: can I just save a little piece of that message (some sort of ID) which I can later use to do the ack? I believe that when I call ackMessage(), inside it uses some ID to send to the broker anyway, it should not need the whole message.