We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The current Consumer/Publisher classes hides the channels, I think we should rethink the API altogether.
Consumer
Publisher
Braindump:
from carrot import Connection, Consumer, Producer connection = Connection(host="localhost", user="guest", "password="guest", vhost="/") channel = connection.Channel() consumer = Consumer(channel, queue="celery", exchange="celery", routing_key="celery") consumer.register_callback(process_task) while True: connection.drain_events() # or channel.drain_events() will only receive events on that channel. producer = Producer(channel, exchange="celery") producer.publish({"task": "celery.ping", args=[], kwargs={}}, serializer="pickle")
A ConsumerSet is now simply using the same channel with more than one consumer:
channel = connection.Channel() c1 = Consumer(channel, queue="foo") c2 = Consumer(channel, queue="bar") c3 = Consumer(channel, queue="baz") while True: connection.drain_events()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The current
Consumer
/Publisher
classes hides the channels, I think we should rethink the API altogether.Braindump:
A ConsumerSet is now simply using the same channel with more than one consumer:
The text was updated successfully, but these errors were encountered: