activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Pavlovich <mattr...@gmail.com>
Subject Re: ActiveMQ pooled Connection Factory for multiple durable subscribers
Date Thu, 21 Aug 2014 15:39:25 GMT
I don’t recommend using pools for consumers, until you have a specific scenario that a single
connection per consumer doesn’t fit your needs. Pre-tuning usually results in de-tuning
when it comes to messaging.

Start with a single connection and single consumer and measure performance there.  Most applications
will perform as needed with that configuration.

As far as multiple durable subscriptions— I suggest looking at using Virtual Topics instead.
 Durable Subscribers are one of the painful leftovers from JMS 1.1 that we are stuck with,
but ActiveMQ made Virtual Topics so we aren’t forced to suffer =)

On Aug 19, 2014, at 2:28 AM, Steven Turner <steventurner808@gmail.com> wrote:

> FYI: This is how my configuration looks like: 
> 
>      <bean id="ConnFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory"
>      destroy-method="stop">
>      <property name="connectionFactory">
>      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>      <property name="brokerURL">
>      <value>${mybroker.url}</value>
>      </property>
>      </bean>
>      </property>
>      <property name="maxConnections" value="4" />
> 
> and my listener is using it as:
>   <bean id="listenerContainer"
> 
> class="org.springframework.jms.listener.DefaultMessageListenerContainer">
>          <property name="connectionFactory" ref="ConnFactory" />
>          <property name="destination" ref="test.1" />
>          <property name="durableSubscriptionName" value="test1" />
>          <property name="pubSubDomain" value="true" />
>          <property name="subscriptionDurable" value="true" />
>          <property name="clientId" value="test1" />
>          <property name="messageListener" ref="MessageListener" />
>     </bean>
> 
> <bean id="listenerContainer"
> 
> class="org.springframework.jms.listener.DefaultMessageListenerContainer">
>          <property name="connectionFactory" ref="ConnFactory" />
>          <property name="destination" ref="test.2" />
>          <property name="durableSubscriptionName" value="test2" />
>          <property name="pubSubDomain" value="true" />
>          <property name="subscriptionDurable" value="true" />
>          <property name="clientId" value="test2" />
>          <property name="messageListener" ref="MessageListener2" />
>     </bean>
> <bean id="listenerContainer"
> 
> class="org.springframework.jms.listener.DefaultMessageListenerContainer">
>          <property name="connectionFactory" ref="ConnFactory" />
>          <property name="destination" ref="test.3" />
>          <property name="durableSubscriptionName" value="test3" />
>          <property name="pubSubDomain" value="true" />
>          <property name="subscriptionDurable" value="true" />
>          <property name="clientId" value="test3" />
>          <property name="messageListener" ref="MessageListener3" />
>     </bean>
> <bean id="listenerContainer"
> 
> class="org.springframework.jms.listener.DefaultMessageListenerContainer">
>          <property name="connectionFactory" ref="ConnFactory" />
>          <property name="destination" ref="test.4" />
>          <property name="durableSubscriptionName" value="test4" />
>          <property name="pubSubDomain" value="true" />
>          <property name="subscriptionDurable" value="true" />
>          <property name="clientId" value="test4" />
>          <property name="messageListener" ref="MessageListener4" />
>     </bean>
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-pooled-Connection-Factory-for-multiple-durable-subscribers-tp4684735p4684736.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message