hanami / events

[Experimental] Events framework for Hanami
MIT License
43 stars 7 forks source link

Allow passing extra args to subscribe in Events::Mixin #76

Closed ianks closed 6 years ago

ianks commented 6 years ago

For certain pub/sub systems, it's crucial to pass a name or id attribute to each subscriber so they can be individually identified. This ensures correct delivery of a message to a subscription. This PR makes it so the mixin will happily accept optional args and pass them to the adapter. Without this, it would not be possible to correctly implement an adapter for https://github.com/adHawk/hanami-events-cloud_pubsub