You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hey morning i got issue with Connection.drain_events(timeout=60) function
it stay in drain event a lot more than it should by the given timeout
i built an example code that give the same problem and in the mean time i built another process that send garbage message every 60 seconds so the drain_event would stop after 60 seconds.
i do not think that is optimal solution and would be glad to have alternative solution as in my understanding drain event should throw time out error after 60 seconds even if message wasn't given
example code:
with Connection(self.broker_url, ssl=self.ssl, heartbeat=self.heartbeat) as conn:
chan = conn.channel()
with conn.Consumer(channel=chan, callbacks=[messageHandler]) as self.consumer:
chan.basic_qos(prefetch_size=0, prefetch_count=self.prefetch_count, a_global=False)
entry_time = time.time()
self.logger.info('performing drain_events with drain_events_time_out=60')
conn.drain_events(timeout=60)
exit_time = time.time()
time_in_drain_events = exit_time - entry_time
self.logger.info('drain_events exited after time_in_drain_events=%s', time_in_drain_events)
got log like:
drain_events exited after time_in_drain_events=225.69921612739563
which is way more than the excepted 60s
checked my messages log and found that the connection doesn't respect the timeout if the connection do not got message
The text was updated successfully, but these errors were encountered:
using kombu 5.2.4 and amqp==5.1.1
hey morning i got issue with
Connection.drain_events(timeout=60)
functionit stay in drain event a lot more than it should by the given timeout
i built an example code that give the same problem and in the mean time i built another process that send garbage message every 60 seconds so the drain_event would stop after 60 seconds.
i do not think that is optimal solution and would be glad to have alternative solution as in my understanding drain event should throw time out error after 60 seconds even if message wasn't given
example code:
got log like:
drain_events exited after time_in_drain_events=225.69921612739563
which is way more than the excepted 60s
checked my messages log and found that the connection doesn't respect the timeout if the connection do not got message
The text was updated successfully, but these errors were encountered: