MQ消息工具(生产者、消费者封装)。
Project description
使用手册
快速开始
- 生产者
import mqplus
producer = mqplus.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 mqplus
def handle_message(data, **kwargs):
print(kwargs)
consumer = mqplus.RabbitConsumer("docker.kancy.top", "root", "root123")
consumer.onListener("pika.test.queue", callback=handle_message)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mqplus-0.0.2.tar.gz
(3.8 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
mqplus-0.0.2-py3.9.egg
(2.8 kB
view details)
File details
Details for the file mqplus-0.0.2.tar.gz.
File metadata
- Download URL: mqplus-0.0.2.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f2aba27a40dc82c22e066adcf723c7b8d9131002166e22342eb96d15484c41f
|
|
| MD5 |
08a68ebdeb03192a3e8bf7adfd9bbe2d
|
|
| BLAKE2b-256 |
6b1e335ce4450af9064e50570e9ba136125cdc5a31fc71f3ddb856152b3de9e5
|
File details
Details for the file mqplus-0.0.2-py3.9.egg.
File metadata
- Download URL: mqplus-0.0.2-py3.9.egg
- Upload date:
- Size: 2.8 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c8adcec463e5842bb714981d4e94ab8bce3f38ccdf029da0c5327195aa34617
|
|
| MD5 |
b38e14b6d84db8ce1b5121589316b2fd
|
|
| BLAKE2b-256 |
97eccde763679b0761da1bbdc2a8ad84f227c3dc868a1719f24f90b13209d00d
|
File details
Details for the file mqplus-0.0.2-py2.py3-none-any.whl.
File metadata
- Download URL: mqplus-0.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea1771cc0181c2bee1299b8128acf378df355562138fc3f9da41724f0dc1ae17
|
|
| MD5 |
97797f6fde5f8dfcabed4e09a2e35e53
|
|
| BLAKE2b-256 |
ee582aa03d311665b80b5a4dd36626b788d51af261d317db5af4b12c37282ebe
|