DAS_2024_1/balakhonov_danila_lab_4/program/consumer_2.py

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)