Open shreyasdn opened 2 years ago
Hi,
The SUB socket is tricky. Nothing will show up in the Pushpin logs unless there is at least one subscribing client. You also need to be careful about the general race condition with ZeroMQ PUB/SUB, which happens if you send too soon after connecting the SUB socket and you've not yet received subscriptions. For example, if you make a simple program that connects to Pushpin and immediately sends a message, it will likely be dropped. The SUB socket is better used by long-running programs. For short-running programs, you should publish via HTTP. If you just want to test sending to Pushpin's SUB socket from a short-running program, try inserting a delay after connecting but before sending a message.
There's no need to do anything with the routes. You can have requests routed to an HTTP backend and still publish via ZeroMQ.
Hi, Thanks for the answer i am providing a 3 seconds delay to the PUB socket but still no success. Also just so that i have understood correctly the pushpin server itself subscribes for updates to any channel it send out right?
That's correct. You could try using https://github.com/fanout/pushpin/blob/master/tools/monitorsubsock.py (requires python 2 and pyzmq
) to inspect the subscribes/unsubscribes.
Hello @shreyasdn @jkarneges
I am facing similar problem. Did it work for you ? Any resolution ?
I have a setup where i have a docker image running the pushpin server and have used configuration from the sample file to configure the server. I am able to get and send messages via http but i am unable to publish back messages to the 0MQ SUB socket. Does the SUB socket also require routes file to have a 0MQ line? Can http and 0MQ be used together i.e. get message to backend via http and send message back to pushpin via 0MQ? I have posted the config used below. Also on the pushpin side i am unable to check if the message from the socket has reached, I have turned on the debug mode but am not able to see any activity.