You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Sean Beck <se...@gmail.com> on 2013/06/27 23:35:20 UTC

Problem getting custom header

So I send messages with a custom header called "uuid" and a camel program
that aggregates based on this header. I know that the value gets set in my
messages. However when I pull a message from the queue in my camel program
and use newExchange.getProperty("uuid") and cast it to a string, I get null
as a value. Why might this be?

Re: Problem getting custom header

Posted by Sean Beck <se...@gmail.com>.
I figured it out. getProperty() wasn't accessing my uuid header. Switched
it to getIn().getHeader("uuid", String.class). Thanks though!

On Thu, Jun 27, 2013 at 3:47 PM, Christian Müller <
christian.mueller@gmail.com> wrote:

> Message header or Exchange property?
> Which type is the object?
> Do you use the jms option transferExchange=true [1]?
>
> [1] http://camel.apache.org/jms.html
>
> Best,
> Christian
> -----------------
>
> Software Integration Specialist
>
> Apache Camel committer: https://camel.apache.org/team
> V.P. Apache Camel: https://www.apache.org/foundation/
> Apache Member: https://www.apache.org/foundation/members.html
>
> https://www.linkedin.com/pub/christian-mueller/11/551/642
>
>
> On Thu, Jun 27, 2013 at 11:35 PM, Sean Beck <se...@gmail.com>
> wrote:
>
> > So I send messages with a custom header called "uuid" and a camel program
> > that aggregates based on this header. I know that the value gets set in
> my
> > messages. However when I pull a message from the queue in my camel
> program
> > and use newExchange.getProperty("uuid") and cast it to a string, I get
> null
> > as a value. Why might this be?
> >
>

Re: Problem getting custom header

Posted by Christian Müller <ch...@gmail.com>.
Message header or Exchange property?
Which type is the object?
Do you use the jms option transferExchange=true [1]?

[1] http://camel.apache.org/jms.html

Best,
Christian
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Thu, Jun 27, 2013 at 11:35 PM, Sean Beck <se...@gmail.com> wrote:

> So I send messages with a custom header called "uuid" and a camel program
> that aggregates based on this header. I know that the value gets set in my
> messages. However when I pull a message from the queue in my camel program
> and use newExchange.getProperty("uuid") and cast it to a string, I get null
> as a value. Why might this be?
>