Announcement Announcement Module
Collapse
No announcement yet.
Multiple subscribers across various JVMs (IPs) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple subscribers across various JVMs (IPs)

    Hello
    Is it possible to configure multiple subscribers running in different JVMs or IP addresses? I tested configuration of several amqp-inbound-adapters connected to same rabbit queue with no success.
    Here is my configuration:

    Code:
      <int-amqp:inbound-channel-adapter channel="channel1"
                                        queue-names="some.queue"
                                        message-converter="jsonMessageConverter"/>
    
      <bean id="handler1" class="some.Handler"/>
    
      <int:service-activator input-channel="channel1"
                             ref="handler1"/>
    
      <int:channel id="channel1"/>
    My goal is to run this subscriber from various JVMs running on different IPs. Is this right way or is better to configure exchange with queue per subscriber (subscribers will be started/stopped during publisher execution).
    Or could show me another right way how to solve this?
    Thank You in advance Standa

  • #2
    You can run that adapter in multiple JVMs. If they are all referencing the same queue, messages will be sent to the different subscribers round-robin. If you instead want them to all receive each message, then you would want each to define its own queue (and then also consider the appropriate Exchange type on the producer side).

    Comment


    • #3
      Ok, now seems to be clear for me.
      Thank You for your reply!

      Comment

      Working...
      X