6 Replies Latest reply on Apr 14, 2010 7:21 AM by Lekan Omotayo

    Sending headers through NMR endpoints

    Marcin Formela Newbie

      Hi, I have a problem with that piece of code:



           .setHeader("test", constant("1"))



      The message I receive in nmr:abc endpoint is without any headers.


      My endpoint class receiving the message implements interface org.apache.servicemix.nmr.api.Endpoint.


      Is any posibility to send headers to a nmr endpoint (or any other way among loosely coupled components)?


      Or at least properties? I was trying to set properties with something like this:



           .process(new Processor() {               

                     public void process(Exchange exchange) throws Exception {                         

                          exchange.setProperty("Test", exchange.getExchangeId());




      but this property is not available in the component receiving data from nmr:abc endpoint (named abc) but it is available in logs, which are receiving a message from abc component. Moreover the exchange id is different in the abc component but in logs is the same as from nmr:xyz. It can be a reason, because the property is assigned to exchange, but how could I handle this?


      I'd really like to be able to see headers (or at least properties) in the component receiving from the endpoint nmr:end.


      Edited by: kisudvd@gmail.com on Mar 5, 2010 11:57 AM