bridge: implement MSGQ to ZMQ bridge with subscriber-based publishing
resolve https://github.com/commaai/msgq/issues/282, only publish services that have subscribers.
Implemented an efficient MSGQ to ZMQ bridge using ZMQ's socket monitoring. The bridge connects to the MSGQ services requested by subscribers and publishes events only when subscribers are active. It enters a sleep state and closes all MSGQ sockets when no subscribers are available, ensuring minimal overhead and scalability.
Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:
- Convert your PR to a draft unless it's ready to review
- Read the contributing docs
- Before marking as "ready for review", ensure:
- the goal is clearly stated in the description
- all the tests are passing
- the change is something we merge
- include a route or your device' dongle ID if relevant
This PR has had no activity for 14 days. It will be automatically closed in 3 days if there is no activity.
@deanlee now PJ streaming looks rather choppy and sometimes skips a split second of data, can you take another look at this?
@sshane I didn't find issue when reviewing the code. Running zmq=1 ./junggle.py --stream also appears to be normal.Has this problem always been present, or is it intermittent?
I found the issue.looks like the old bridge has the same issue too.I'll fix it when back to my computer