activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vikingbs1 <>
Subject ActiveMQPooledConnectionFactory and Caching Producers
Date Wed, 24 Jan 2018 09:13:48 GMT
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

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

Sent from:

View raw message