These are chat archives for fanout/pushpin

5th
Sep 2018
marcelcsantos
@marcelcsantos
Sep 05 2018 15:18
Hello everyone, how are you guys doing? I'm looking for a good pubsub solution to coordinate components in my new Python project and started checking pushpin.
The thing is I'm struggling to set it up properly, apparently. In a terminal, I'm using curl http://localhost:7999/stream/ to listen for messages
When I do pushpin-publish test "hello there" the message shows up in the other terminal, however if I try to use any other channel, nothing happens!
Should I be listening to another port/path to get other channels? Or did I miss something in the setup stages to allow dynamically-created channels?
Justin Karneges
@jkarneges
Sep 05 2018 15:26
hi @marcelcsantos , are you using the test route or is pushpin proxying to a backend?
marcelcsantos
@marcelcsantos
Sep 05 2018 15:28
@jkarneges ATM my routes only has * test in it
I suspected this "test" might have something to do with only a channel with the same name working, but I tried adding other channel names in there and nothing happened.
Do I have to specify which channels will be allowed? Even if that's not ideal, it would suffice for my needs
Justin Karneges
@jkarneges
Sep 05 2018 15:33
the test route (or more properly, the test "target") is a built-in thing to make it easy to try pushpin without a backend. it listens on a channel named "test"
the proper way to use pushpin is to specify a backend server, e.g. with a route * localhost:8000
then the channels are determined by the backend using Grip-Channel response headers
marcelcsantos
@marcelcsantos
Sep 05 2018 15:38
So after setting routes to * localhost:8000 I can use curl http://localhost:8000/stream/ to listen to multiple channels?
Justin Karneges
@jkarneges
Sep 05 2018 15:39
well, curl http://localhost:7999/stream/ (or whatever port pushpin is listening on), sure
the target of the route (e.g. localhost:8000) needs to be a backend server that you operate
like you need an actual existing web service in some language you wrote already, and you're pointing pushpin at it. in case that isn't obvious :)
marcelcsantos
@marcelcsantos
Sep 05 2018 15:46
Oh! It makes more sense now! At first I thought invoking service pushpin start was doing some kind of magic behind the scenes :|
Guess I'll go check some examples, then! Thanks!