Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • "Dynamic Routing" with Switchyard

    Posted on

    Been struggling again... tried the usual resources and I think my basic issue is translating 'base' camel into Switchyard implementations. Any suggestions? For example, trying to set a header inside a DRL; with base camel it should be:
    then
    $message.setHeader("routingSlip", "mock:queue:user_read");
    end

    But in Switchyard, the switchyard Header does not have that method signature... So, then I struggle with trying to implement that particular example into Switchyard.

    All this to say this:
    Trying to modify switchyard quickstart rules camel cbr to route 1 message to 1-n bean endpoints. Message with ID FF0000 to Red, etc, but then I need the case where, ID 010000 needs to go to Red and Green, then 02000 Green and Blue, etc....

    Tried doing this with having a recipientList after Destination Bean DRL:






    ${body.destination}


    This does seem to work:
    16:38:44,505 INFO [org.switchyard.quickstarts.rules.camel.cbr.BlueServiceBean] Blue service processing boxed widget with id: 0100FF-DEF-456
    16:38:44,505 INFO [org.switchyard.quickstarts.rules.camel.cbr.GreenServiceBean] Green service processing boxed widget with id: 0100FF-DEF-456

    Just curious if anyone has a better implementation 'best-practice' for me??

    Attachments

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat