Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3808

DefaultAmqpHeaderMapper should not copy over x-received-from header

    XMLWordPrintable

    Details

      Description

      I'm doing RPC using RabbitMQ using federated links. From sender to receiver this works out of the box, but the reply mechanism fails as follows:

      AmqpInboundGateway calls headerMapper.fromHeadersToReply(reply.getHeaders(), messageProperties); to copy over the headers.

      One of the incoming headers has a key of : "x-received-from"

      The library fails to treat that as special and copies it over to the reply message. This reply message then eventually gets federated back to the sender which thinks that a message is looping and is thus silently dropped because this key contains the node that sent the message.

      Currently there's a mechanism to specify which headers to copy over but there there is no mechanism to specify what to ignore. In our case, a workaround meant doing :

             amqpMessageProperties.getHeaders().remove("x-received-from"); 
      

      to remove the value from the copied over headers

        Attachments

          Activity

            People

            Assignee:
            abilan Artem Bilan
            Reporter:
            wwadge Wallace Wadge
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: