Skip to content
This repository has been archived by the owner on Nov 28, 2020. It is now read-only.

Support event monitoring #23

Open
jean-airoldie opened this issue May 15, 2019 · 5 comments
Open

Support event monitoring #23

jean-airoldie opened this issue May 15, 2019 · 5 comments
Labels
feature request A request for a new feature

Comments

@jean-airoldie
Copy link
Owner

Support the zmq_socket_monitored_versioned API to retrieve events for sockets.

My inital idea is to create a unique monitor_addr for each socket. Then we would call zmq_monitor_versioned with this addr to create a ZMQ_PUB monitor socket. The we could create a SocketMonitor which would leverage a ZMQ_SUB and subscribe to the appropriate events. It would then unpack the data into a SocketEvent enum and feed it to a user provided closure. If there is no significant overhead, we should enable that by default.

We could use the same API to create a event logger.

This is required to fix #19.

@jean-airoldie jean-airoldie added the feature request A request for a new feature label May 15, 2019
@jean-airoldie
Copy link
Owner Author

From my benchmarks creating a socket monitor that listens to all events has no performance impact.

@jean-airoldie
Copy link
Owner Author

It makes sense since:

  • The only potential overhead is the send calls on the PUB socket
  • Such calls happen very rarely (i.e. when connecting or disconnecting)

@jean-airoldie
Copy link
Owner Author

Closed by c6024c4

@jean-airoldie
Copy link
Owner Author

Nevermind the commit was reverted. Created a branch that supports monitoring experimentally.

@jean-airoldie jean-airoldie reopened this May 23, 2019
@jean-airoldie
Copy link
Owner Author

I'm really unsure if I like socket monitoring tbh. Can't think of any real use case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request A request for a new feature
Projects
None yet
Development

No branches or pull requests

1 participant