Reputation: 6920
I am trying to set camel Header value using below Expression
.setHeader("amqName").simple("${amqAddressMap.get(header.userTypeID)}", String.class)
where amqAddressMap is an array list and passing header value as argument but it shows invalid expression error
is there any way to execute the code without using using processor class
Upvotes: 2
Views: 2315
Reputation: 6920
To access ArrayList inside exchange we need to set it as a property
setProperty("amqAddressMap", constant(amqAddressMap))
So that we can access it using EL like
${exchangeProperty.amqAddressMap.get(${header.userTypeID})}
Upvotes: 1