These are chat archives for fanout/pushpin

6th
Nov 2017
smogm
@smogm
Nov 06 2017 08:30
hi
how is it possible to subscribe to multiple channels?
just list the channels comma separated?
smogm
@smogm
Nov 06 2017 09:13
okay, got it
smogm
@smogm
Nov 06 2017 09:25
is it possible to unsubscribe a channel with a wildcard?
lets say i have channel names like "channel:xyz", "channel:uvw" and so on
and each user only subscribes one of those
is it possible to unsubscribe "channel:*" and then subscribe to a new one?
Justin Karneges
@jkarneges
Nov 06 2017 17:33
hi @smogm , it's not possible to unsubscribe with a wildcard, but you could store the current channel using a websocket-over-http meta property
so when your backend first assigns the channel, it could include an HTTP response header Set-Meta-Foo: xyz, causing every subsequent request from pushpin to contain a request header Meta-Foo: xyz. when the backend wants to switch the channel of the connection, it could unsubscribe the channel it sees in that header
it feels a little strange to need to do that though. what exactly is your use case?