What is a transactions in the context of JMS?
Transaction allows us to group a set of operations as a single atomic operation for consistency. All the operations in a transaction either commit successful together or fail as a whole. In JMS, a transaction is defined at the session level. A Publisher transaction is used to group of set of published messages into one single transaction. JMS Server guarantees that either all the messages in this transaction are published or none of them are published from the client to the server. A Subscriber transaction serves to group a set of consumed messages and acknowledges a set of consumed messages. This ensures that if the messages are marked Persistent and are redelivered, either all of them will be redelivered or none of them will be redelivered.