Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

saving value to a context attribute in route

I have a simple route that listens to an ActiveMQ queue using cJMS. The message contains a JMS Property "Subject", and I want to decode it and save it into my context attribute "MySubject" for later use. I am using cProcessor (after the cJMS component) with the following code:
context.MySubject= exchange.getIn().getHeader("Subject").toString();
I can see the correct value returned by the code:  exchange.getIn().getHeader("Subject").toString() (using for example, System.out.println("*****" + exchange.getIn().getHeader("Subject").toString()) ), but when I use the cLog (after cProcessor) to print out the value of context.MySubject, it is null.
Can someone please tell me what I am missing?
Thanks

Labels (2)
1 Reply
Anonymous
Not applicable

Hi
The log endpoint initialized at route start with null value from context variable; try to store your dynamic data using cSetHeader.