[ 
https://issues.apache.org/jira/browse/ARTEMIS-2740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clebert Suconic reopened ARTEMIS-2740:
--------------------------------------
      Assignee: Clebert Suconic

> Broker sends messages from DLQ populated with illegal AMQP message annotations
> ------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-2740
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2740
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: AMQP
>    Affects Versions: 2.11.0, 2.12.0
>            Reporter: Timothy A. Bish
>            Assignee: Clebert Suconic
>            Priority: Blocker
>             Fix For: 2.13.0
>
>
> When dispatching messages from the DLQ the broker is populating the message 
> annotations with values which violate the AMQP specification regarding the 
> symbolic keys that may be used.  Messages are populated with broker specific 
> annotation values such as "_AMQ_ORIG_ADDRESS" which violates the key 
> reservations made by the specification as shown below.
>  
> ??3.2.10 Annotations - The annotations type is a map where the keys are 
> restricted to be of type symbol or of type ulong. All ulong keys, and all 
> symbolic keys except those beginning with "x-" are reserved. Keys beginning 
> with "x-opt-" MUST be ignored if not understood. On receiving an annotation 
> key which is not understood, and which does not begin with "x-opt", the 
> receiving AMQP container MUST detach the link with a not-implemented error.??
>  
> The test added in ARTEMIS-2372 exposes this to some degree and with the below 
> modification it becomes more apparent. 
>  
> {code:java}
> diff --git 
> a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpExpiredMessageTest.java
>  
> b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpExpiredMessageTest.java
> index 54458b2..b240b84 100644
> --- 
> a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpExpiredMessageTest.java
> +++ 
> b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpExpiredMessageTest.java
> @@ -175,6 +175,8 @@
>        Assert.assertNotNull(received);
>        received.accept();
>  
> +      assertEquals(getQueueName(), 
> received.getMessageAnnotation("_AMQ_ORIG_ADDRESS"));
> +
>        assertNotNull("Should have read message from DLQ", received);
>        assertEquals(0, received.getTimeToLive());
>        assertNotNull(received);
>  {code}



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

Reply via email to