Announcement Announcement Module
Collapse
No announcement yet.
One subscriber and multiple consumer Topic Exchange doubt? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • One subscriber and multiple consumer Topic Exchange doubt?

    Started with a topic exchange and i am polling through web gui. Trying to build a web based chat project to start with...I have one subscriber and multiple consumer...but the message is received only by one consumer..

    Couple of questions here
    1)If the same message has to be delivered to n consumers , do i need to create n queues. I mean one queue for each consumer.
    2)Also if the consumer replies back with a message , which queue does that message go to? How do i configure this..

  • #2
    Regarding #1: Yes. Each Message in a Queue will be delivered to at most one consumer. You can bind multiple Queues to an Exchange and have at least one consumer per-Queue (multiple consumers still make sense, e.g. for load-balancing).

    Regarding #2: The MessageProperties supports a 'replyTo' address.

    Comment


    • #3
      See your other thread for answer to the pub-sub question.

      Did you know that the JSON-RPC plugin actually has a chat application as a demo (see http://dev.rabbitmq.com/www-examples/chat/index.html)?

      Comment


      • #4
        Originally posted by Mark Fisher View Post
        Regarding #1: Yes. Each Message in a Queue will be delivered to at most one consumer. You can bind multiple Queues to an Exchange and have at least one consumer per-Queue (multiple consumers still make sense, e.g. for load-balancing).

        Regarding #2: The MessageProperties supports a 'replyTo' address.


        Thanks Mark and Dave,

        Wanted to clarify if this is correct and i am implementing this in a right way.
        If the user logs in and sends a message to a fanout exchange.
        And 10 other users logs in and bind to this this exchange declaring a new queue. We will have 10 queues at that time.

        If at any given time if i have 100 users logged, will end up creating 100 queues. Plus if i want one to one chat, will create a seperate queue for that user.

        Comment


        • #5
          Correct as far as I can tell.

          Comment

          Working...
          X