activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Consumer Priority
Date Fri, 28 Apr 2006 04:28:56 GMT
AFAIK the consumer priority is automatically lowered for network
connectors; so local clients always have a higher priority than remote
brokers.

On 4/26/06, greenbean <Kevin.Urciolo@ngc.com> wrote:
>
> 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.
>
>


--

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message