I am trying to publish a message to rabbitmq. this works in production environment env with the same code so I suspect this is a configuration issue.
rbqueue = RabbitMQClientQueue('cn-dip-v3', host = rabbitmq_config['host'], username = rabbitmq_config['user'], password = rabbitmq_config['password'])
channel = rbqueue.connection.channel()
args = {"x-max-priority": 10}
channel.queue_declare(queue='cn-dip-v3', durable=True, arguments=args)
result = channel.queue_declare(exclusive=True)
callback_queue = result.method.queue
msgBody = json.dumps({"ohad":123})
# may happen that sendResponseToDal is True but there is no sendResponseToDal method on server side
data = {"body":msgBody,"queue_response" : False}
if responseHandler:
data["queue_response"] = True
corrID = str(uuid.uuid4())
channel.basic_publish(exchange='',routing_key='cn-dip-v3',properties=pika.BasicProperties(priority = 10, reply_to = callback_queue,correlation_id = corrID,),body=json.dumps(data))
The queue_declare
works . if I delete it and run the same line the queue gets defined. I see it in the management panel, which is oddly, in port 55672 and not 15672.