One Star

Using HTTP response statuscode in cMessageRouter

Hi,
inside a Job we set the header "CamelHttpResponseCode" (which is the http response statuscode) to a defined value.
Depending on this status we want to choose a different way inside the route. For this we added a cMessageRouter in the route. Our question is now: How to set the Condition inside the cMessageRouter component?
We tried with type "simple" the following condition:
"${header.CamelHttpResponseCode} == 200"
But it did not work.
Thank you & greetings
1 REPLY
Employee

Re: Using HTTP response statuscode in cMessageRouter

Hi Jens,
I don't see any problems with your approach.  Import the attached for an example.
test_http.zip.zip
Regards,
Ben