Even if the ESB is using internally reliable JMS as a transport the messages can be lost during ESB termination. The reasons for this behaviour are two
1) ESB uses internally queue sessions with AUTO_ACK flag
2) Pick-up and deliver couriers works in different session
1) Change flag to CLIENT_ACK
2) JMS sessions are allocated from the pool using JMSConnectionPool.getQueueSession(). If the allocated session is stored into ThreadLocal variable and returned by the subsequent calls by the same thread and get commited on call JMSConnectionPool.closeSession() then all internal message transfers via JMS will be done in transaction - one transfer/one transaction.