[ 
https://issues.apache.org/jira/browse/CAMEL-21749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17927704#comment-17927704
 ] 

Claus Ibsen commented on CAMEL-21749:
-------------------------------------

Yes header filter strategy would be better, and then if you have suggestions 
for more default headers to include then in the top list.

Also if you are aware of any object type that NATS does not allow then the 
filter should skip those, like its done in JMS etc.

> 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
>            Priority: Major
>
> 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