diff options
author | Hervé Beraud <hberaud@redhat.com> | 2019-12-16 15:04:37 +0100 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2020-01-14 11:57:10 +0000 |
commit | e4a8900aa71aece02583f5f272b95766b12a851f (patch) | |
tree | fc57d05c8833cbd7050ed581a2880dd5dfc9c0c4 | |
parent | 859e0d4eaa45d75eb822f4a6be46c547187c6358 (diff) | |
download | oslo-messaging-e4a8900aa71aece02583f5f272b95766b12a851f.tar.gz |
Adding debug logs on AMQPListener poll
Adding some debug logs to track execution on the AMQPListener poll
function to observe if workers incoming messages are dispatched to
workers and if listener is stuck.
Change-Id: Ia9b9ef62b0b59c78283c6a8cc5b7ce42282e73b5
-rw-r--r-- | oslo_messaging/_drivers/amqpdriver.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/oslo_messaging/_drivers/amqpdriver.py b/oslo_messaging/_drivers/amqpdriver.py index ccab0ce..eb33e4d 100644 --- a/oslo_messaging/_drivers/amqpdriver.py +++ b/oslo_messaging/_drivers/amqpdriver.py @@ -304,8 +304,11 @@ class AMQPListener(base.PollStyleListener): while not self._shutdown.is_set(): self._message_operations_handler.process() + LOG.debug("Listener is running") if self.incoming: + LOG.debug("Poll the incoming message with unique_id: %s", + self.incoming[0].unique_id) return self.incoming.pop(0) left = stopwatch.leftover(return_none=True) @@ -315,8 +318,10 @@ class AMQPListener(base.PollStyleListener): return None try: + LOG.debug("AMQPListener connection consume") self.conn.consume(timeout=min(self._current_timeout, left)) except rpc_common.Timeout: + LOG.debug("AMQPListener connection timeout") self._current_timeout = max(self._current_timeout * 2, ACK_REQUEUE_EVERY_SECONDS_MAX) else: @@ -324,8 +329,11 @@ class AMQPListener(base.PollStyleListener): # NOTE(sileht): listener is stopped, just processes remaining messages # and operations + LOG.debug("Listener is stopped") self._message_operations_handler.process() if self.incoming: + LOG.debug("Poll the incoming message with unique_id: %s", + self.incoming[0].unique_id) return self.incoming.pop(0) self._shutoff.set() |