The CachingConnectionFactory uses a HashMap to cache message producers. The key to the map is the Destination. Unfortunately when using MQ, the producers are cached but never retrieved, a new MesssageProducer is created and cached for each call. This eventually results in MQ raising an exception when trying to create the MessageProducer (a session limit is hit after just 253 publishes). The cache should use an explicit key (as the consumer cache does) or even Destination#toString().