You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Michael Piotrowski (Commented) (JIRA)" <ji...@apache.org> on 2012/02/01 14:57:03 UTC
[jira] [Commented] (AMQ-1853) Optional non-blocking redelivery
[ https://issues.apache.org/jira/browse/AMQ-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197838#comment-13197838 ]
Michael Piotrowski commented on AMQ-1853:
-----------------------------------------
I see a problem. I downloaded AMQ 5.6-SNAPSHOT, configured it and my ConnectionFactory (wrapped) bean looks like this:
<bean id="jmsConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory"
destroy-method="stop">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL">
<value>${jms.broker.urls}</value>
</property>
<property name="redeliveryPolicy">
<bean class="org.apache.activemq.RedeliveryPolicy">
<property name="maximumRedeliveries" value="4"/>
<property name="initialRedeliveryDelay" value="3000"/>
<property name="useExponentialBackOff" value="true"/>
<property name="backOffMultiplier" value="2"/>
</bean>
</property>
<property name="nonBlockingRedelivery" value="true" />
</bean>
</property>
</bean>
The problem is that if 'nonBlockingRedelivery' is set to TRUE AFTER RedeliveryPolicy property, redelivering takes much more time than specified in RedeliveryPolicy object properties. On the other hand - while 'nonBlockingRedelivery' is put BEFORE declaration od RedeliveryPolicy - it takes under consideration only 'maximumRedeliveries' property - but with no delay and multiplier. That makes whole redelivery thing totally wrong - i got defult 6 requests one by one.
Is this normal and expected behaviour? How can I achieve taking redeliveryPolicy properties to run?
> Optional non-blocking redelivery
> --------------------------------
>
> Key: AMQ-1853
> URL: https://issues.apache.org/jira/browse/AMQ-1853
> Project: ActiveMQ
> Issue Type: Wish
> Components: Broker
> Affects Versions: 5.1.0
> Reporter: Demian Mrakovich
> Assignee: Timothy Bish
> Fix For: 5.6.0
>
> Attachments: AMQ1853Test.java
>
>
> When a message is redelivered the consumer blocks for the amount of time specified by the redelivery delay. For a high load scenario where message order is irrelevant this is just reducing performance and will result in a complete halt if the delay is long and several bad messages are consumed in a short time.
> I think what I basically wish for is how it worked in versions 3.x, prior to fix for AMQ-268. So I would very much like to have configurable option to NOT block consumers when redelivering messages.
> If no-one feels up to it, I'd still appreciate some hints and I could try to fix it myself. Looking at ActiveMQMessageConsumer.rollback(), I was thinking something in the lines of just scheduling a task to put the message back on queue after a delay - if configured to, instead of stopping delivery and a schedule a task to resume delivery again. But I do not possess an understanding of AMQ thorough enough to predict potential side effects of this, so any analysis would be helpful.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira