Results 1 to 4 of 4

Thread: Same Message needs to go to two different Queues.

  1. #1

    Question Same Message needs to go to two different Queues.

    I have a message that needs to gets converted into BytesMessage before being sent to two channels.
    Currently, I have a message that gets put into two different channels through a Router and gets routed to two different message-channel-adapters which have messageConverters for them.
    What I want to do is to instead of converting twice, can I convert once and send it to message-driven-channel-adapters without having messageConverters? If I can do that, what model do you recommend? A service-activator or anything else?

  2. #2
    Join Date
    Mar 2006
    Posts
    312

    Default

    Without knowing much about your process beyond your description below I'd suggest a shape like Transformer > Splitter > Router

    1. Transform payload to byte array
    2. Split into 2 messages, enrich header with appropriate value for routing
    3. Route to appropriate channel adapter on header value


    I believe the default behavior of the channel adapter will extract the byte array payload for you and construct a JMS BytesMessage.

  3. #3
    Join Date
    Nov 2008
    Location
    Swansea, Wales
    Posts
    202

    Default

    I think if you use receipientListRouter you don't need to split the message, just define a list of channels to route the message to

  4. #4
    Join Date
    Mar 2006
    Posts
    312

    Default

    Ah, good suggestion rhart -- I was unfamiliar with RecipientListRouter.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •