import json
channel.basic_publish(exchange='', routing_key='task_queue', body=json.
    dumps(message), properties=pika.BasicProperties(delivery_mode=2))
RabbitMQ: How to send Python dictionary between Python producer and consumer?