Pika timeout

68 views
Skip to first unread message

Orges Skura

unread,
Nov 3, 2023, 7:09:20 AM11/3/23
to Pika
Hello,
What is the best way to implement a system so that when trying to connect to rabbitmq, we timeout when 10 seconds have passed and the connection is not established yet?

Gavin M. Roy

unread,
Nov 3, 2023, 10:41:30 AM11/3/23
to pika-...@googlegroups.com
See the timeouts and connection attempt parameters in the ConnectionParameters class https://pika.readthedocs.io/en/stable/modules/parameters.html

On Fri, Nov 3, 2023 at 7:09 AM 'Orges Skura' via Pika <pika-...@googlegroups.com> wrote:
Hello,
What is the best way to implement a system so that when trying to connect to rabbitmq, we timeout when 10 seconds have passed and the connection is not established yet?

--
You received this message because you are subscribed to the Google Groups "Pika" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pika-python...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pika-python/1285f56d-1f1e-4bf0-854b-849f39abfe37n%40googlegroups.com.

Orges Skura

unread,
Nov 3, 2023, 1:28:27 PM11/3/23
to Pika
Thank you. One more question. Would the  blocked_connection_timeout parameter affect the consuming of messages? Or does it only affect the initial part of connecting to the rabbitmq server?
Best wishes,
Orges

Gavin M. Roy

unread,
Nov 3, 2023, 2:23:11 PM11/3/23
to pika-...@googlegroups.com
I believe that is specifically for when RabbitMQ sends a Connection.Blocked RPC for a publisher who is overloading the server.

Reply all
Reply to author
Forward
0 new messages