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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] How use cMessageRouter?

Hi,

I try to do a message router with talend ESB :

from("direct:start")
   .choice()
        .when(header("foo").startsWith("ba"))
            .log("je passe par le when")
            .to("direct:when")
        .otherwise()
            .log("je passe par le otherwise")
            .to("direct:other");

I could do it with a "javaDSL" but I'd like to use a "cMessageRouter".
How works the component cMessageRouter?
How generate a "when(Predicate)" and not a "when().language(…)"?

My environment :
[list=*]
  • Windows 7

  • Talend Open Studio version 5.6.0



  • Thanks,
    Labels (3)
    1 Solution

    Accepted Solutions
    Anonymous
    Not applicable
    Author

    Hi,

    You could use cMessageRouter component but with simple language condition like this:
    "${headers.foo} regex '^ba.*'"

    Currently the Studio is not able to generate code to support
    when(header("foo").startsWith("ba"))

    but cMessageRoute + simple language would solve your use case above.

    Regards.

    View solution in original post

    2 Replies
    Anonymous
    Not applicable
    Author

    Hi,

    You could use cMessageRouter component but with simple language condition like this:
    "${headers.foo} regex '^ba.*'"

    Currently the Studio is not able to generate code to support
    when(header("foo").startsWith("ba"))

    but cMessageRoute + simple language would solve your use case above.

    Regards.
    Anonymous
    Not applicable
    Author

    Ok,
    your solution works great.
    thx