Skip to main content

SodaMQ客户端库,用于消息队列通信

Project description

SodaMQ Client

SodaMQ客户端库,用于通过SignalR协议进行消息队列通信。

安装

pip install soda-mq-client

基本用法

创建客户端

from core.soda_client import SodaClient

# 创建SodaMQ客户端
client = SodaClient("http://your-sodamq-server-url")

# 连接到服务器
client.connect()

发送消息

# 向指定主题发送消息
client.send_message("your-topic", {"key": "value"})

订阅主题

# 定义消息处理函数
def on_message(message):
    print(f"收到消息: {message}")

# 订阅主题
client.subscribe("your-topic", on_message)

断开连接

# 断开连接
client.disconnect()

高级用法

请参考core目录下的soda_producer.pysoda_consumer.py文件了解更多高级用法。

许可证

MIT

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

soda_mq_client-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

soda_mq_client-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file soda_mq_client-0.1.0.tar.gz.

File metadata

  • Download URL: soda_mq_client-0.1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for soda_mq_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bfbe85917661396d1250933333bb9dc7223e166c7b5185ae93cfa8fef60dc14d
MD5 5dbd281bb2a9cab669da2e90b2704198
BLAKE2b-256 927f858574c012ccdbe8f93883c6ac7b45819496a4f606d24ba31cc278959b7d

See more details on using hashes here.

File details

Details for the file soda_mq_client-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: soda_mq_client-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for soda_mq_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d124e2e45c3a3d744e2d2880b4a93ef9b02efb892637d0e3ff1b17f2c9079a8e
MD5 13923a6266bfc708328c6de1b164757a
BLAKE2b-256 0ef2b3a58c6fd1db240cbfb014a17b60170444fbf8651e0253b5fc9f2d572a44

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