You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Prakhar (JIRA)" <ji...@apache.org> on 2018/07/16 10:35:00 UTC

[jira] [Created] (CAMEL-12654) RabbitMQ Headers - Headers with null value are skipped.

Prakhar created CAMEL-12654:
-------------------------------

             Summary: RabbitMQ Headers - Headers with null value are skipped.
                 Key: CAMEL-12654
                 URL: https://issues.apache.org/jira/browse/CAMEL-12654
             Project: Camel
          Issue Type: Bug
          Components: camel-rabbitmq
    Affects Versions: 2.21.1
            Reporter: Prakhar


Reference: Conversation with Claus Ibsen on [Stackoverflow|https://stackoverflow.com/questions/50583749/apache-camel-how-to-setheader-value-as-null]

org.apache.camel.component.rabbitmq.RabbitMQMessageConverter.buildProperties() skips the headers which have value null. The actual java client for RabbitMQ does not have this check. It accepts a basic Map<String,Object> which can accept null value. [Reference|https://rabbitmq.github.io/rabbitmq-java-client/api/current/com/rabbitmq/client/AMQP.BasicProperties.Builder.html] . Check the definition of headers() method

*The business scenario where we use it*. On the RabbitMQ, we accept messages from multiple sources. Depending on whether a specific header is null or not, we route these message downstream in our processing pipeline.

If required, I could provide a working example of rabbitmq java-client to demonstrate that the headers with null value are not skipped



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)