rabbitplus 0.0.1

Last updated:

0 purchases

rabbitplus 0.0.1 Image
rabbitplus 0.0.1 Images
Add to Cart

Description:

rabbitplus 0.0.1

使用手册
快速开始

生产者

import rabbitplus

producer = rabbitplus.RabbitProducer("docker.kancy.top", "root", "root123")
producer.putQueue("test", "pika.test.queue")

# 注册交换机
producer.registerExchange("pika.test.exchange", 'direct')

# 注册队列
producer.registerQueue("pika.test.queue", durable=True)

# 绑定交换机很队列
producer.bind("pika.test.exchange", "pika.test.queue")


消费者

import rabbitplus

def handle_message(data, **kwargs):
print(kwargs)

consumer = rabbitplus.RabbitConsumer("docker.kancy.top", "root", "root123")
consumer.onListener("pika.test.queue", callback=handle_message)

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.