Skip to main content

MQ消息工具(生产者、消费者封装)。

Project description

使用手册

快速开始

  1. 生产者
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")
  1. 消费者
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


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)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mqplus-0.0.2-py3.9.egg (2.8 kB view details)

Uploaded Egg

mqplus-0.0.2-py2.py3-none-any.whl (2.2 kB view details)

Uploaded Python 2Python 3

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

Hashes for mqplus-0.0.2.tar.gz
Algorithm Hash digest
SHA256 4f2aba27a40dc82c22e066adcf723c7b8d9131002166e22342eb96d15484c41f
MD5 08a68ebdeb03192a3e8bf7adfd9bbe2d
BLAKE2b-256 6b1e335ce4450af9064e50570e9ba136125cdc5a31fc71f3ddb856152b3de9e5

See more details on using hashes here.

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

Hashes for mqplus-0.0.2-py3.9.egg
Algorithm Hash digest
SHA256 7c8adcec463e5842bb714981d4e94ab8bce3f38ccdf029da0c5327195aa34617
MD5 b38e14b6d84db8ce1b5121589316b2fd
BLAKE2b-256 97eccde763679b0761da1bbdc2a8ad84f227c3dc868a1719f24f90b13209d00d

See more details on using hashes here.

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

Hashes for mqplus-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ea1771cc0181c2bee1299b8128acf378df355562138fc3f9da41724f0dc1ae17
MD5 97797f6fde5f8dfcabed4e09a2e35e53
BLAKE2b-256 ee582aa03d311665b80b5a4dd36626b788d51af261d317db5af4b12c37282ebe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page