You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: Add NNG (Nanomsg Next Gen) Broker Support #602
Currently, taskiq provides support for a ZeroMQ broker. However, the existing ZMQ implementation comes with certain architectural limitations, specifically regarding seamless asynchronous integration, dynamic worker discovery, and the complexity of managing socket lifecycles when nodes randomly disconnect or scale.
For high-performance, brokerless distributed systems, developers often need a lighter, more modern alternative to handle messaging topologies without the boilerplate and fragility of raw ZMQ socket management inside asyncio loops.
Describe the solution you'd like
I would like to propose adding NNG (Nanomsg Next Generation) broker support to taskiq, potentially utilizing Python bindings like pynng.
NNG is a modern, lightweight rewrite of Nanomsg that addresses many of the scalability and state-handling issues found in older ZMQ architectures. A dedicated NNG broker would provide:
Clean, native asyncio integration out-of-the-box.
Decoupled dialers and listeners, meaning far more robust reconnection patterns when workers crash or restart.
A clean, lightweight environment for fast inter-process and network communications, ideal for modern microservice architectures.
Describe alternatives you've considered
Using the existing ZeroMQ broker: This currently feels restrictive due to the boilerplate required to safely manage central proxy topologies and the lack of robust, automated reconnect handling in complex asynchronous contexts.
Writing a custom broker from scratch: While possible, NNG is a standard, highly efficient protocol. Having official or community-supported integration in the taskiq ecosystem would greatly benefit developers building fast, lightweight asynchronous services.
Additional context
Adding an NNG backend (e.g., taskiq-nng) would be a huge win for developers looking for reliability and performance in their message queues without deploying heavy infrastructure like Redis, Kafka or NATS, keeping the technology stack lean and efficient.
Hello, @alexted and thanks for your interest in the project. I actually appreciate that you showed me this broker. I've never heard of it, and after trying I should admit, that I enjoyed how easy it was to integrate and how cool the technology is.
Thank you for highlighting it. However, it seems like you have much more experience with this technology than I do. Can you please take a few minutes of your time to review my pull request that I made at #607. I'd be very glad if you could. In case if you cannot, I'll just merge it after few days.
Activity
s3rius commentedon Apr 11, 2026
Hello, @alexted and thanks for your interest in the project. I actually appreciate that you showed me this broker. I've never heard of it, and after trying I should admit, that I enjoyed how easy it was to integrate and how cool the technology is.
Thank you for highlighting it. However, it seems like you have much more experience with this technology than I do. Can you please take a few minutes of your time to review my pull request that I made at #607. I'd be very glad if you could. In case if you cannot, I'll just merge it after few days.
alexted commentedon Apr 19, 2026
Thank you for being so open to this! I'm glad you liked the technology. I’ve left a few comments on the PR.
Thanks for all your work!
alexted commentedon Apr 26, 2026
Here is a more detailed architectural overview to better illustrate the design and execution flow.
See #612.
Architecture Overview
Execution Flow (Single Task)
Key Design Principles
This should give a clearer mental model of how the system operates beyond just the code-level changes.