question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does message confirmation work? (Rabbit backend)

See original GitHub issue

I see there’s a commit referenced in #193 and some stuff in the docs.

I have set up an errback function and am using ensure, have also tried the extra transport options given here: http://stackoverflow.com/a/21016469/202168

publish appears to send a message to my broker: I see a blip in the ‘Return’ graph of my test exchange (Rabbit web UI) but nothing goes through to the queue.

I guess I have something configured wrong, it sounds to me like a ‘Return’ means the message has bounced. My errback does not get called though.

I also noticed that here in publish method it says the mandatory and immediate args are “currently not supported”. I tried using them and immediate gives a “AMQPNotImplementedError” but mandatory does not.

At the moment I’m not sure a) if the kombu message confirm/retry/errback stuff works or b) how to debug my publishing problem.

I was also wondering about the on_return arg for a Producer (“Callback to call for undeliverable messages”)… it sounds like what I need. It says “Note that the producer needs to drain events to use this feature”… I’m not clear exactly how this relates to the producer.

There’s a drain_events method on the connection… I tried:

publish = conn.ensure(producer, producer.publish,
                      errback=_errback, max_retries=3)

publish(message, **kwargs)
print conn.drain_events(timeout=5)

The drain times-out though… am I doing it wrong? or no return/error means no events to drain, i.e. message succeeded?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
askcommented, Mar 23, 2016

Btw, “confirms” usually refer to publisher confirmations, which is not related to the mandatory flag.

To use publisher confirms you need to use pyamqp (not librabbitmq), and set the confirm_publish transport option: Connection(transport_options={'confirm_publish': True}), or if using Celery: BROKER_TRANSPORT_OPTIONS = {'confirm_publish': True}.

0reactions
zbentleycommented, Jul 29, 2019

UPD1: confirms are not shown in Rabbit Management Console.

They are shown, at least in RabbitMQ 3.6+; if you open a connection object you can see a “mode” setting of C for connections with confirms enabled.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wait until message producer receives confirmation of work ...
In my producer, I am calling confirm_select on my Bunny::Channel instance to put it into confirmation code, and after publish -ing my messages, ......
Read more >
Developing Message-Based Applications with RabbitMQ
A message is just a piece of information that is sent between two applications. Introducing a Message Broker provides some key advantages.
Read more >
RabbitMQ tutorial - Remote procedure call (RPC)
When a request appears, it does the job and sends a message with the result back to the Client, using the queue from...
Read more >
Understanding message queuing systems using RabbitMQ
We explore queuing systems using RabbitMQ, a highly performant, open-source message broker with support for a variety of messaging ...
Read more >
Part 3: The RabbitMQ Management Interface - CloudAMQP
Publish show the rate at which messages are entering the server and Confirm show a rate at which the server is confirming.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found