Results 1 to 3 of 3

Thread: Multiple subscribers across various JVMs (IPs)

  1. #1
    Join Date
    Jan 2013
    Posts
    2

    Default 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. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    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).

  3. #3
    Join Date
    Jan 2013
    Posts
    2

    Default

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

Posting Permissions

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