use fanout exchange
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2020-04-13 16:22:12 +02:00
parent 81e96b4162
commit cc757e1455
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047

View File

@ -15,4 +15,5 @@ __version__text__ = "1"
credentials = pika.PlainCredentials(RABBITMQ_USERNAME, RABBITMQ_PASSWORD) credentials = pika.PlainCredentials(RABBITMQ_USERNAME, RABBITMQ_PASSWORD)
rabbitmq = pika.BlockingConnection(pika.ConnectionParameters(host=RABBITMQ_HOST, credentials=credentials)) rabbitmq = pika.BlockingConnection(pika.ConnectionParameters(host=RABBITMQ_HOST, credentials=credentials))
rabbitmq_channel = rabbitmq.channel() rabbitmq_channel = rabbitmq.channel()
rabbitmq_channel.exchange_declare(exchange=RABBITMQ_EXCHANGE, exchange_type='fanout')
rabbitmq_channel.queue_declare(RABBITMQ_QUEUE) rabbitmq_channel.queue_declare(RABBITMQ_QUEUE)