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
def setup_consumer(topic_list):
try:
consumer = Consumer(
<options for broker>,
'auto.offset.reset':'earliest',
'fetch.min.bytes': '200000',
}
)
consumer.subscribe(topic_list)
except Exception as e:
app.logger.error(
f'Exception during creation of active calls consumer - {e}'
)
return
start_consumer(consumer)
The consumer code looks like this
while True:
message = consumer.poll(0.1)
if message is None:
print('Waiting for message')
gevent.sleep(0.1)
continue
elif message.error():
print(f'Error in loop {message.error()}')
break
else:
print('Message received')
....
When I start the consumer it takes at least 45s to see the print "Message received"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I set up the consumer first
The consumer code looks like this
When I start the consumer it takes at least 45s to see the print "Message received"
Beta Was this translation helpful? Give feedback.
All reactions