-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
AMQ 7.12.0.GA
-
None
The broker connector fails to forward messages and instead routes them to the DLQ when the address is not set at the message level. Scenarios without forwarding work fine, but when a receiver broker link is defined:
<broker-connections> <amqp-connection uri="tcp://node2.test.redhat.com:5673" name="receiver-connection" retry-interval="100" reconnect-attempts="-1" user="admin" password="admin"> <receiver address-match="examples"/> </amqp-connection> </broker-connections>
messages deposited on the source broker without an address set at the message level fail to cross the connector and instead go into the DLQ. Trace logging indicates the cause:
2024-05-29 10:31:43,686 TRACE [org.apache.activemq.artemis.protocol.amqp.proton.handler.ProtonHandler] Handling EventImpl{type=DELIVERY, context=DeliveryImpl [_tag=[5], _link=org.apache.qpid.proton.engine.impl.SenderImpl@30f99b77, _deliveryState=null, _settled=false, _remoteSettled=true, _remoteDeliveryState=Rejected{error=Error{condition=failed, description='Missing 'to' field for message sent to an anonymous producer', info=null}}, _flags=0, _defaultDeliveryState=null, _transportDelivery=org.apache.qpid.proton.engine.impl.TransportDelivery@57676221, _data Size=0, _complete=true, _updated=true, _done=true]} towards org.apache.activemq.artemis.protocol.amqp.proton.AMQPConnectionContext@3f00fbe7 2024-05-29 10:31:43,687 WARN [org.apache.activemq.artemis.core.server] AMQ222149: Sending message Reference[1339]:RELIABLE:AMQPStandardMessage( [durable=true, messageID=1339, address=exampleQueue, size=110, scanningStatus=SCANNED, applicationProperties={}, messageAnnotations={x-opt-jms-dest=0, x-opt-jms-msg-type=5}, properties=Properties{messageId=xxxxxxxxxx, userId=null, to='null', subject='null', replyTo='null', correlationId=null, contentType=null, contentEncoding=null, absoluteExpiryTime=null, creationTime=Wed May 29 10:31:43 UTC 2024, groupId='null', groupSequence=null, replyToGroupId='null'}, extraProperties = TypedProperties[_AMQ_AD=exampleQueue]] to Dead Letter Address DLQ from exampleQueue
If the message address is not set, the connector should derive it from the source address or link target.