Search code examples
rabbitmqmuleamqp

AMQP acknowledgement mule


I'm having issues with the AMQP Connector in Mule ESB. When I send an request-response message inside my flow, initiated by an AMQP Inbound Endpoint. When I acknowledge the message I get an error about the inbound property 'delivery-key' missing.

I've tried setting and outbound property and sending that through a VM endpoint to another flow where it became and inbound property. However this didn't work.

I am using RabbitMQ.


Solution

  • AMQP message acknowledgement requires both a channel and a delivery key. Because channel is not serializable, it is stored in a flow variable (invocation-scoped message property) to prevent problems with serialization needs to occur at some point of the message processing (for example when using persisted VM queues).

    With the version of the connector you are using, the delivery key is only stored in an inbound message properties. As explained in this ticket, inbound message properties are wiped-out when you use an outbound-endpoint amid flow (as you do with your https:outbound-endpoint).

    You have two options:

    • Build the mule-3.3.x branch of the AMQP transport to get the remediation (delivery key stored in a flow variable),
    • Use a message-enricher to wrap your SOAP call in order to isolate it from the main flow so it won't wreak havoc in the inbound properties,