Kombu disconnects on publish
See original GitHub issueI’ve posted this elsewhere:-
https://github.com/celery/kombu/issues/463
but I figured it might be considered a separate issue so I created this issue as well.
When I do a lot of high frequency consume and publishes kombu is disconnecting on a publish command with the following error:-
W_FORCE_CONNECT.format(attr=attr)))
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/nanowire_plugin/__init__.py", line 447, in send_to_next_plugin
'max_retries':10})
File "/usr/local/lib/python3.6/site-packages/kombu/messaging.py", line 181, in publish
exchange_name, declare,
File "/usr/local/lib/python3.6/site-packages/kombu/connection.py", line 494, in _ensured
return fun(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/kombu/messaging.py", line 203, in _publish
mandatory=mandatory, immediate=immediate,
File "/usr/local/lib/python3.6/site-packages/amqp/channel.py", line 1745, in basic_publish_confirm
self.wait(spec.Basic.Ack)
File "/usr/local/lib/python3.6/site-packages/amqp/abstract_channel.py", line 79, in wait
self.connection.drain_events(timeout=timeout)
File "/usr/local/lib/python3.6/site-packages/amqp/connection.py", line 471, in drain_events
while not self.blocking_read(timeout):
File "/usr/local/lib/python3.6/site-packages/amqp/connection.py", line 477, in blocking_read
return self.on_inbound_frame(frame)
File "/usr/local/lib/python3.6/site-packages/amqp/method_framing.py", line 55, in on_frame
callback(channel, method_sig, buf, None)
File "/usr/local/lib/python3.6/site-packages/amqp/connection.py", line 480, in on_inbound_method
return self.channels[channel_id].dispatch_method(
TypeError: 'NoneType' object is not subscriptable
This is failing to reconnect even after attempting to reconnect 10 times:-
producer.publish(send_payload, exchange='', routing_key=next_plugin, retry=True,
retry_policy={'interval_start':1,
'interval_step':2,
'interval_max':10,
'max_retries':10})
Also worth noting is that I get the following warning when kombu attempts to reconnect:-
/usr/local/lib/python3.6/site-packages/amqp/connection.py:292: AMQPDeprecationWarning: The .transport attribute on the connection was accessed before
the connection was established. This is supported for now, but will
be deprecated in amqp 2.2.0.
Since amqp 2.0 you have to explicitly call Connection.connect()
before using the connection.
I assume this warning will disappear when we move to kombu 4.2 but is there any word on the publish disconnect error?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:20 (2 by maintainers)
Top Results From Across the Web
Kombu disconnects on publish - python - Stack Overflow
I'm having trouble publishing messages using kombu 4.1. My use case is that I have a server that collects messages from a rabbitmq...
Read more >Kombu Documentation - Read the Docs
Having a producer instance you can publish messages: >>> from kombu import Exchange. >>> exchange = Exchange('name', type='direct'). > ...
Read more >Change history — Kombu 5.2.4 documentation - Celery
When publishing messages to the Pidbox, retry if an error occurs. Contributed by Asif Saif Uddin. Fix infinite loop in :method: kombu.asynchronous.hub.
Read more >Python Connection.release Examples
These are the top rated real world Python examples of kombu. ... if self.connection: self.connection.release() self.connection = None def publish(self, ...
Read more >Kombu: Async Consumer - Google Groups
then I will be working on async publish, and then exhange.declare,queue.declare/queue.bind/basic.ack/basic.qos. Async connect and disconnect is not a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this is a shame that the issue didn’t get proper attention it needed.! sorry guys! did you found any workaround?
closing the issue based on this.