activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From greenbean <Kevin.Urci...@ngc.com>
Subject Consumer Priority
Date Wed, 26 Apr 2006 22:26:44 GMT

Say we have two servers with two worker machines consuming from queues spread
across two sites.  We want local worker machines to consume from the local
server and fall back to the remote worker.  Will something like what is
shown below work to allow the consumer priority to function?

I tried this, and messages appear to be consumed in a round robin style,
ignoring the priorities.

	<bean id="requestQueuePrimary"
		class="org.apache.activemq.command.ActiveMQQueue"
		autowire="constructor">
		<constructor-arg>
			<value>requestQueue?consumer.priority=1</value>
		</constructor-arg>
	</bean>

	<bean id="requestQueueSecondary"
		class="org.apache.activemq.command.ActiveMQQueue"
		autowire="constructor">
		<constructor-arg>
			<value>requestQueue?consumer.priority=10</value>
		</constructor-arg>
	</bean>

	<bean id="beanActivationSpecPrimary"
		class="org.apache.activemq.ra.ActiveMQActivationSpec">
		<property name="activeMQDestination" ref="requestQueuePrimary" />
		<property name="destinationType" value="javax.jms.Queue" />
		<property name="maximumRedeliveries" value="3" />
		<property name="messageSelector" value="" />		
	</bean>

	<bean id="beanActivationSpecSecondary"
		class="org.apache.activemq.ra.ActiveMQActivationSpec">
		<property name="activeMQDestination" ref="requestQueueSecondary" />
		<property name="destinationType" value="javax.jms.Queue" />
		<property name="maximumRedeliveries" value="3" />
		<property name="messageSelector" value="" />		
	</bean>

	<bean id="beanConnectionPrimary" class="org.jencks.JCAConnector">
		<property name="jcaContainer" ref="jencksPrimary" />
		<property name="activationSpec" ref="beanActivationSpecPrimary" />
		<property name="ref" value="requestReceivingBean" />
	</bean>
	
	<bean id="beanConnectionSecondary" class="org.jencks.JCAConnector">
		<property name="jcaContainer" ref="jencksSecondary" />
		<property name="activationSpec" ref="beanActivationSpecSecondary" />
		<property name="ref" value="requestReceivingBean" />
	</bean>	

	<bean id="requestReceivingBean"
		class="requestReceiverBean">
	</bean>
--
View this message in context: http://www.nabble.com/Consumer-Priority-t1514590.html#a4111003
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message