dunglas/mercure

Connection events

deivid11 opened this issue ยท 11 comments

Is it possible to trigger events and send them to my application server to know if a user is connected/disconnected?

Hi @deivid11,

The hub is able to log such events in the fluentd format. While there is no direct event mechanism provided by the hub, if you use an ELK stack or something similar, you can watch such events.

Thanks @dunglas I will try that.

Is it planned to add something in the spec to handle this use case or do you consider it out of scope ?

Being able to build a system that display who is currently online using mercure could be nice.

Iโ€™m currently working on this topic. Maybe could we add something in the regarding this topic, but it has to be optional to not make it hard to implement for simple use cases. It could also just be an extension to the spec.

rimoi commented

hello @dunglas new about this topic?

Thanks

Hi @dunglas we are really interested in some kind of ETA about this ๐ŸŽ‰ Would be a great improvement for use ๐Ÿ‘

Any progress? Would be really nice to have such a functionality. Would also be cool to get a list of connected clients in a specific topic.

Would like to know if there has been any progress or eta, too ?

Is it possible make an event for this?
I have no experience with golang. I was looking at the log.go file, to figure it out, if it is possible todo like below:

  • add kinda reserved topic
  • publish it to the reserved topic with an @type (0 for disconnect, 1 for connect with it's payload in the jwt), identifier, etc

We are in need of delivering a feature which will show connected users on our platform (onConnected and onDisconnected events for mercure). It would be great if you could tell us whether such feature will be implemented, and if that's possible - when?

Hi,
Can we get an update on this @dunglas ?