I am using PooledConnectionFactory with JMSTemplate and want to use it without anonymous producers. We have a custom plugin that relies on the name of the destination to perform authorization checks and hence cannot use the anonymous producer feature.
However, a new producer is created for every message send and I see this is by design in PooledSession.java public MessageProducer getMessageProducer(Destination destination) throws JMSException { MessageProducer result = null; if (useAnonymousProducers) { result = safeGetSessionHolder().getOrCreateProducer(); } else { result = getInternalSession().createProducer(destination); } return result; } Is there a reason why producers aren't cached with PooledConnectionFactory (when not using anonymous producers similar to CachingConnectionFactory)? In our case we have a high throughput application and we don't want to incur the overhead of creating producers for every message send. Thanks in advance. -- Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html