Announcement Announcement Module
Collapse
No announcement yet.
How to leverage Spring Integration in a JMS-based distributed architecture? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to leverage Spring Integration in a JMS-based distributed architecture?

    For the following scenario I am looking for your advices and tips on best practices:

    In a distributed (mainly Java-based) system with:
    • many (different) client applications (web-app, command-line tools, REST API)
    • a central JMS message broker (currently in favor of using ActiveMQ)
    • multiple stand-alone processing nodes (running on multiple remote machines, computing expensive operations of different types as specified by the JMS message payload)

    How would one best apply the JMS support provided by the Spring Integration framework to decouple the clients from the worker nodes? When reading through the reference documentation and some very first experiments it looks like the configuration of an JMS inbound adapter inherently require to use a subscriber, which in a decoupled scenario does not exist (sorry if I missed or overlooked something).

    Small side note: communication should happen via JMS text messages (using a JSON data structure for future extensibility).

  • #2
    Spring Integration provides realization of JMS abstractions within Enterprise Integration Patterns (EIP). For example: channels backed by JMS destinations, inbound/outbound channel adapters and gateways (further simplify message senders and listeners), etc.

    it looks like the configuration of an JMS inbound adapter inherently require to use a subscriber, which in a decoupled scenario does not exist (sorry if I missed or overlooked something).
    Not sure i understand what do you mean by that.

    Comment


    • #3
      Scenario a bit more in detail

      I am trying to solve the following scenario...

      on the "client" side:
      • send msg -> JMS request queue -> Msg broker
      • wait until response (with proper correlation ID) returns on the JMS response queue

      on the "processing" node (there might be multiple types):
      • wait for messages to appear on the JMS request queue
      • pick up and do some calculations, put back message to response queue

      How would this be best configured by SI means?

      Comment


      • #4
        It seems like you are trying to build a classic request/response flow via JMS.

        Have you look at SI JMS sample?
        https://src.springsource.org/svn/spr...n-samples/jms/

        Comment


        • #5
          Yep, I did, but I found the JMS sample coming with the spring integration sources rather academic than helpful in a real world (speak: distributed) scenario.

          In the mean-time I found a post which exactly describes the solution I was looking for:
          http://forum.springsource.org/showthread.php?t=82102

          Comment

          Working...
          X