[ 
https://issues.apache.org/jira/browse/AMQ-3597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13153043#comment-13153043
 ] 

Timothy Bish commented on AMQ-3597:
-----------------------------------

I think there's a bit of misunderstanding regards redelivery vs redispatch of a 
message.  From the client side when a transaction is rolled back the messages 
are redelivered from the consumers own internal storage and the broker is only 
notified after one retry is attempted and fails that redelivery has occurred.  
The client continues to retry delivery each time the transaction is rolled back 
until some configured limit is reached (if one is desired) and then poisons the 
message which causes it to be sent to the DLQ.  

If the consumer were to be closed for some reason before the transaction was 
committed then the broker would need to redispatch the message to another 
consumer.  To this new consumer its the first time that its ever seen this 
message regardless of whether it a new message or one that's been redelivered 
so the need for a delay in this case seems odd to me but perhaps I don't fully 
understand your use case or the problem you are trying to solve.  

Perhaps you might find the solution defined in AMQ-2710 to be of use in your 
scenario.  Here the messages that are poisoned because they were deemed 
undeliverable are moved from the DLQ and rescheduled for send after a delay 
using the brokers own scheduled message feature.  

If this isn't want you are going for then perhaps you can take a step back and 
better define what the use case is and what problem you are trying to solve.  
The current implementation of the consumer doesn't have an easy way to delay a 
message on dispatch only on rollback so if you want to add something like that 
you'd need to do some work. 
                
> Enable RedeliveryPolicy to determine next delay independent of the consumer
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-3597
>                 URL: https://issues.apache.org/jira/browse/AMQ-3597
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.5.1
>            Reporter: Eric Hubert
>            Assignee: Timothy Bish
>             Fix For: 5.6.0
>
>
> Currently the redelivery is bound to the consumer instance requiring the end 
> user to use the same message consumer instance. This is due to the fact that 
> the redelivery delay is computated based on the previous redelivery delay 
> (stored with the consumer instance) and not based on the redeliveryCount of 
> the message.

--
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

        

Reply via email to