13 lines
311 B
Python
13 lines
311 B
Python
from consumer_1 import consume
|
|
from publisher import EXCHANGE
|
|
|
|
QUEUE = 'consumer_2_queue'
|
|
|
|
def callback(ch, method, properties, body):
|
|
print(f'[x] CONSUMER 2: GET.. {body.decode()}')
|
|
|
|
print('[!] CONSUMER 1 OFF')
|
|
|
|
|
|
if __name__ == "__main__":
|
|
consume(callback=callback, queue=QUEUE, exchange=EXCHANGE) |