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

Justin Bertram commented on ARTEMIS-3190:
-----------------------------------------

I just wrote an integration test for (as far as I can tell) this exact 
scenario. I used AMQP, ensured that the dead-letter address didn't exist prior 
to consuming the message, used a transacted session with 
{{CLIENT_ACKNOWLEDGE}}, set {{max-delivery-attempts}} to {{10}} and 
{{auto-create-dead-letter-resources}} to {{true}}, and rolled back the 
transaction after every {{receive()}}. The dead-letter address and queue were 
created and the message was routed as expected. There must be something 
different in your use-case as opposed to mine. Can you provide a reproducible 
test-case?

> AMQ222289: Did not route to any matching bindings on dead-letter-address DLQ 
> and auto-create-dead-letter-resources is true
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-3190
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3190
>             Project: ActiveMQ Artemis
>          Issue Type: Wish
>          Components: Broker
>    Affects Versions: 2.17.0
>            Reporter: Erwin Dondorp
>            Priority: Major
>
> When a client rollbacks the offered messages, the following error is visible:
> {noformat}
> WARN  [org.apache.activemq.artemis.core.server] AMQ222289: Did not route to 
> any matching bindings on dead-letter-address DLQ and 
> auto-create-dead-letter-resources is true; dropping message: 
> Reference[375]:RELIABLE:AMQPStandardMessage( [durable=true, messageID=375, 
> address=x1, size=189, applicationProperties={}, 
> properties=Properties{messageId=8bedcf71-a878-469f-9fdf-937c3dc44a02, 
> userId=null, to='x1', subject='null', replyTo='null', correlationId=null, 
> contentType=null, contentEncoding=null, absoluteExpiryTime=null, 
> creationTime=Fri Mar 19 12:07:02 UTC 2021, groupId='null', 
> groupSequence=null, replyToGroupId='null'}, extraProperties = 
> TypedProperties[_AMQ_AD=x1]]
> {noformat}
> The original source code of Artemis says "this shouldn't happen, but in case 
> it does it's better to log a message than just drop the message silently". 
> And indeed the message is dropped.
> setup:
> * use a client that uses createSession(true, Session.CLIENT_ACKNOWLEDGE)
> * let the client always rollback the offered message
> * server has auto-create-dead-letter-resources=true for all addresses
> after 10 tries, the server gives up on the message and tries to move it to 
> the DLQ address --> OK.
> when the DLQ address does not exist yet, it is created --> OK
> when the queue under DLQ does not exist yet, it is created --> OK
> but moving the message to that queue fails with the above message --> FAIL
> this results in message loss.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to