DEV Community

Discussion on: Intuitive Ruby Event Router

Collapse
 
kinnalru profile image
Samoilenko Yuri

It's very useful (and important) to be able to subscribe to all event especially with filtering. It can be used for debugging or logging particular events.
Github ex: log all events(any kind) for specific user, or catch all notifications for particular PullRequest

Thread Thread
 
ahmadelassuty profile image
Ahmad Elassuty

It makes sense to have better support for debugging and logging for sure, but not necessary through global listeners that has filtering functionality, as the filtering can happen as part of the destination handlers (business logic).

Generally, I see the value of having global listeners, but what I'm not sure of is creating global destinations that subscribe to Event instead of Event routing to destinations as adopted by the current API. That will require adopting two completely different APIs. Also as you mentioned, there is already gems doing so, not sure if there is any gem that is backed with a storage system, e.g Redis/Rabbitmq like EventRouter. What do you think?