Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 239871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:37:13+00:00 2026-05-11T20:37:13+00:00

Im trying to move a system from using morbid to rabbitmq, but I cannot

  • 0

Im trying to move a system from using morbid to rabbitmq, but I cannot seem to get the same broadcast behaviour morbid supplied by default. By broadcast I mean that when a message is added to the queue, every consumer recieves it. With rabbit, when a message is added they are distributed round robin style to every listener.

Can anyone tell me how to achieve the same kind of message distribution?

The stomp library used below is http://code.google.com/p/stomppy/

Failing being able to do with with stomp, even a amqplib example would really help.

My code at present looks like this

The Consumer

import stomp

class MyListener(object):
    def on_error(self, headers, message):
        print 'recieved an error %s' % message

    def on_message(self, headers, message):
        print 'recieved a message %s' % message

conn = stomp.Connection([('0.0.0.0', 61613), ('127.0.0.1', 61613)], 'user', 'password')
conn.set_listener('', MyListener())
conn.start()
conn.connect(username="user", password="password")
headers = {}

conn.subscribe(destination='/topic/demoqueue', ack='auto')

while True:
    pass
conn.disconnect()

And the sender looks like this

import stomp

class MyListener(object):
    def on_error(self, headers, message):
        print 'recieved an error %s' % message

    def on_message(self, headers, message):
        print 'recieved a message %s' % message

conn = stomp.Connection([('0.0.0.0', 61613), ('127.0.0.1', 61613)], 'user', 'password')
conn.set_listener('', MyListener())
conn.start()
conn.connect(username="user", password="password")
headers = {}

conn.subscribe(destination='/topic/demotopic', ack='auto')

while True:
    pass
conn.disconnect()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T20:37:13+00:00Added an answer on May 11, 2026 at 8:37 pm

    I finally figured out how to do it by creating an exchange for each “recieving group”, im not sure how well rabbit will do with thousands of exchanges, so you might want to figure test this heavily before trying it in production

    In the sending code:

    conn.send(str(i), exchange=exchange, destination='')
    

    The blank destination is required, all I care about is sending to that exchange

    To recieve

    import stomp
    import sys
    from amqplib import client_0_8 as amqp
    #read in the exchange name so I can set up multiple recievers for different exchanges to tset
    exchange = sys.argv[1]
    conn = amqp.Connection(host="localhost:5672", userid="username", password="password",
     virtual_host="/", insist=False)
    
    chan = conn.channel()
    
    chan.access_request('/', active=True, write=True, read=True)
    
    #declare my exchange
    chan.exchange_declare(exchange, 'topic')
    #not passing a queue name means I get a new unique one back
    qname,_,_ = chan.queue_declare()
    #bind the queue to the exchange
    chan.queue_bind(qname, exchange=exchange)
    
    class MyListener(object):
        def on_error(self, headers, message):
            print 'recieved an error %s' % message
    
        def on_message(self, headers, message):
            print 'recieved a message %s' % message
    
    conn = stomp.Connection([('0.0.0.0', 61613), ('127.0.0.1', 61613)], 'browser', 'browser')
    conn.set_listener('', MyListener())
    conn.start()
    conn.connect(username="username", password="password")
    headers = {}
    
    #subscribe to the queue
    conn.subscribe(destination=qname, ack='auto')
    
    while True:
        pass
    conn.disconnect()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 190k
  • Answers 190k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer True, but the question is what option performs better. In… May 12, 2026 at 5:57 pm
  • Editorial Team
    Editorial Team added an answer You will have the build the query dynamically, i.e. list… May 12, 2026 at 5:57 pm
  • Editorial Team
    Editorial Team added an answer Looks like you just need to reset the $teamgo string… May 12, 2026 at 5:57 pm

Related Questions

First, context: I'm trying to create a command-line-based tool (Linux) that requires login. Accounts
I'm looking for some arguments to pitch to my boss and fellow developers. We're
My company is in the process of rewriting our software from scratch, and I'm
I have an application that (currently) needs to uses DBs served by both SQL

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.