Mikael Koskinen created CAMEL-21749:
---------------------------------------

             Summary: Camel NATS & Expanded header usage
                 Key: CAMEL-21749
                 URL: https://issues.apache.org/jira/browse/CAMEL-21749
             Project: Camel
          Issue Type: New Feature
          Components: camel-nats
    Affects Versions: 4.10.0
            Reporter: Mikael Koskinen


Currently NATS Producer and Consumer both only use some of the headers included 
in the NATS msg:
{code:java}
                    exchange.getIn().setHeader(NatsConstants.NATS_REPLY_TO, 
msg.getReplyTo());
                    exchange.getIn().setHeader(NatsConstants.NATS_SID, 
msg.getSID());
                    exchange.getIn().setHeader(NatsConstants.NATS_SUBJECT, 
msg.getSubject());
                    exchange.getIn().setHeader(NatsConstants.NATS_QUEUE_NAME, 
msg.getSubscription().getQueueName());
                    
exchange.getIn().setHeader(NatsConstants.NATS_MESSAGE_TIMESTAMP, 
System.currentTimeMillis());{code}
This is problematic in couple of ways: NATS nowadays has quite many headers 
which are missing from the list. And also as NATS itself doesn't limit what 
headers are used, the headers often contain app specific metadata which would 
be helpful to have in Camel Integrations.

Does the NATS component have to limit the headers that it reads? Could it read 
them all? Or could we use something like headerFilterStrategy in this?

I'm happy to help with implementing the code but would appreciate if someone 
can provide guidance on design.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to