activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Turner <steventurner...@gmail.com>
Subject Re: ActiveMQ pooled Connection Factory for multiple durable subscribers
Date Tue, 19 Aug 2014 07:28:45 GMT
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