You could use the broker redelivery plugin described at the bottom of http://activemq.apache.org/message-redelivery-and-dlq-handling.html. On Nov 5, 2015 8:59 AM, "xiaoliuliu2050" <1287567...@qq.com> wrote:
> now I configure my program like this: > > <amq:redeliveryPolicyMap id="redeliveryPolicyMap"> > <amq:defaultEntry> > > <amq:redeliveryPolicy maximumRedeliveries="5"/> > </amq:defaultEntry> > <amq:redeliveryPolicyEntries> > <amq:redeliveryPolicy queue="orderCreate" > maximumRedeliveries="10" > initialRedeliveryDelay="1000" > backOffMultiplier="2" > useExponentialBackOff="true" > maximumRedeliveryDelay="10000" > useCollisionAvoidance="true"/> > > </amq:redeliveryPolicyEntries> > </amq:redeliveryPolicyMap> > > > and the container like this : > > > <bean id="listenerContainer" > class="org.springframework.jms.listener.DefaultMessageListenerContainer"> > > <property name="connectionFactory" ref="pooledConnectionFactory" > /> > <property name="destination" ref="orderCreate" /> > <property name="messageListener" ref="messageListener" /> > <property name="concurrency" value="1"/> > <property name="sessionTransacted" value="true"/> > </bean> > > > you can notice that the property nemed "concurrency" ,its value is 1 ; > > with such configuration,when i send some message ,if one failed , > the failed one will occupy the thread until the message was redeilveried 10 > times, > and then other message can be processed . > > now i want to know ,what can i do to let the other message to be processed > first? > and then process the error one. > > > > > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/how-to-use-the-redeliveryPolicy-correctly-tp4703693.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >