Closed sl624 closed 4 years ago
publisher publish 1000000 msg. consumer starts later to receive the msg. it hangs after 100000 msgs. Code shown below:
Publisher
args={'x-recent-history-length':1000000} channel.exchange_declare(exchange='buffer', exchange_type='x-recent-history', arguments =args) for i in range(1000000): message = datetime.now().strftime("%H:%M:%S") + '.' + str(i) channel.basic_publish(exchange='buffer', routing_key='', body=message)
Consumer
channel.exchange_declare(exchange='buffer', exchange_type='x-recent-history') result = channel.queue_declare(exclusive=True) queue_name = result.method.queue channel.queue_bind(exchange='buffer', queue=queue_name) print(' [*] Waiting for buffer. To exit press CTRL+C') def callback(ch, method, properties, body): msg_id = int (body.split('.')[1]) if msg_id % 10000 == 0: print(" [x] %s: %r" % (datetime.now().strftime("%H:%M:%S"),body))
Note: this might be related to issue #27
Closing due to inactivity.
publisher publish 1000000 msg. consumer starts later to receive the msg. it hangs after 100000 msgs. Code shown below:
Publisher
Consumer
Note: this might be related to issue #27