elm-phoenix
elm-phoenix copied to clipboard
Difference between channels and topics
Hi! I am trying to use it with Absinthe Subscriptions. But there is a problem related to channels - I want an ability to retrieve message from different topic but not join such channel.
As you can see on screenshot we actually join only __absinthe__:control channel, but got subscription incoming data at __absinthe__:doc:62645988 topic. And I can't join it (and shouldn't).
Do you think it's possible to get data from different topic but same channel?
Thanks!
I see the issue here. I think we could add special callback which can be added to Channel, e.g.
|> Channel.onAbsintheSubscription "__absinthe__:doc:62645988" myCallback
which would then add this to a new internal dictionary.
Then you could hook into the selfMsg Receive case and trigger the callback.
I currently do not have the time to add this on my own, but I can review any Pull Request you come up with :)
Checking how I can do it already :)
BTW do you think it should mention Absinthe at all? Just thought about something like
|> Channel.withExtraTopic "__absinthe__:doc:62645988" Receive