I am trying to implement JMS for my present project.
I have created message producer and message consumer as two separate applications and want to have production and consumption as two separate processes(clients). But my requirement is to have transaction management between producer and consumer. Say if producer was sending batch of 100 messages and if any of a single message delivery fails, whole 100 massage batch should failed.
I guess I can achieve this, because my each batch of messages sent is in separate session, so I can commit or rollback the session. But my consumer is async and runs on single session.
How can I achieve transaction management in consumer ? I want consumer should also rollback above mentioned 100 message batch processing if any of the single message processing (consumption) from that batch fails.