Skip to main content

A thread-safe message queue implementation.

Project description

NioFluxMQ

A thread-safe message queue implementation.

Installation

pip install -U nioflux-mq
uv add -U nioflux-mq

Quick Start

  1. Start a server

    python -m nioflux_mq.server
    
    PS D:\project\NioFluxMQ> py -m nioflux_mq.server
    [INFO] 2025-09-01 14:14:35,188 nioflux.mq : \
        _   __ _____                             
       / | / / ____/                             
      /  |/ / /___                               
     / /|  / ____/                               
    /_/ |_/_/                                    
    =0.0.0.0:26105=                              
    NioFluxMQServer started.  
    
  2. Access MQ via clients

    1. Connect to a server

      from nioflux_mq.client.client import NioFluxMQClient
      
      client = NioFluxMQClient(host='127.0.0.1', port=26105)
      
    2. Register a topic

      client.register_topic('topic_0')
      
    3. Register a consumer

      client.register_consumer('consumer_0')
      
    4. Sent a message to a topic

      client.produce(b'message_0', 'topic_0', ttl=1)
      
    5. Consume a message

      message = client.consume('consumer_0', 'topic_0').data
      client.advance('consumer_0', 'topic_0')
      
    6. Retreat the pointer if you missread some messages

      client.retreat('consumer_0', 'topic_0')
      

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

nioflux_mq-0.0.1.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

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

nioflux_mq-0.0.1-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file nioflux_mq-0.0.1.tar.gz.

File metadata

  • Download URL: nioflux_mq-0.0.1.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for nioflux_mq-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e5dbfe57663fe95244761a7b9c655f9e45b5a4d430483dbcf6a4ebad16025c95
MD5 b5266bbb721ef3561a2ef03e8fa4e70b
BLAKE2b-256 5772adecd6b97fbfb228b2e5889825fcdc7ee1ea1f993ae0a41e9ad8e83e75be

See more details on using hashes here.

File details

Details for the file nioflux_mq-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: nioflux_mq-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for nioflux_mq-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0aa6dfc1cc382f365ef32ed57333ce90faefa8f13634598ca9cd56221845bc1c
MD5 ad49f416dcf963f1fb8a8bd42c3217bc
BLAKE2b-256 a0bfb7cc01d1f0bc813e552e3ed75807775a5b527372b23de24a165fa9226cb1

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