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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
FrancoisSmfy
Contributor III
Contributor III

Using Java in a cProcessor the send message in queue(s)

Hello,

We have an ESB route which, according to some properties (is<System>), send the current message in one or more ActiveMQ queues. We actually have to configure each new system by hand with a new condition, and we wish to make it dynamic.

 

Our idea is to read all the headers of the message, and each time it begins by "is", we send it to the matching queue (using a bean method). For that, we need to write in Java, in a cProcessor, the correct code to it :

 

<String, Object> headers = exchange.getIn().getHeaders();
for(String key : headers.keySet())
{ if(key.matches("is(.*)")
{ String queueCible = beans.BESTBean.getQueueName(key, (String)exchange.getIn().getHeader("SourceSystem"), (String)exchange.getIn().getHeader("Entity")); // missing code to send the message to the "queueCible"
} }

Did someone knows how to do it ?

Labels (2)
4 Replies
fdenis
Master
Master

tjavaflex may help you.
tlibrary load also.

why dont you use tJMSInput and TJMSOutput?
FrancoisSmfy
Contributor III
Contributor III
Author

Because I want to do it in a camel route, not in bundle OSGI job. I want to keep it as simple and fast as possible.

fdenis
Master
Master

so go to tjavaflex.
FrancoisSmfy
Contributor III
Contributor III
Author

There isn't any t<ComponentName> (t for Talend) components when we design a route, only c<ComponentName> (c for camel) components.

So the tJavaFlex isn't in the Palette and can't be used.