Re: [zeromq-dev] PUB/SUB not sending data

2023-11-23 Thread Francesco
Hi Raul, I think the example at https://learning-0mq-with-pyzmq.readthedocs.io/en/latest/pyzmq/patterns/pubsub.html is using a "while True" just for the sake of the example. The main point is that the PUB socket is global, it is initialized once, and then has a long-lifetime (basically it's

Re: [zeromq-dev] PUB/SUB not sending data

2023-11-23 Thread Raúl Parada Medina
Hi, I've followed this tutorial, however, it includes the while True statement which I would like to avoid and it's more complex as required. Best, Raúl Missatge de Brett Viren del dia dc., 22 de nov. 2023 a les 15:00: > Hi again, > > Perhaps copy-paste the example: > > >

Re: [zeromq-dev] PUB/SUB not sending data

2023-11-22 Thread Brett Viren via zeromq-dev
Hi again, Perhaps copy-paste the example: https://learning-0mq-with-pyzmq.readthedocs.io/en/latest/pyzmq/patterns/pubsub.html and play with it to get some understanding of the socket lifetimes and timing of the subscription phase. You might start with that code and modify it to get closer

Re: [zeromq-dev] PUB/SUB not sending data

2023-11-22 Thread Raúl Parada Medina
Hi, Thanks both of you. Brett, I have the socket.subscribe(" "), I've forgotten to add it in the code. Apologies. Francesco, I've tried to add time.sleep of 1 second and remove the while running, however, the subscriber doesn't receive anything. This is the current-published code: sock =

Re: [zeromq-dev] PUB/SUB not sending data

2023-11-22 Thread Francesco
Hi Brett, Hi Raul, My feeling is that there is a misconception as well, but that's related to the socket lifetime. A PUB socket is not an object meant to be created, have 1 msg pushed out and then immediately destroyed, as it happens inside the senderzmq() python function of original email. The

Re: [zeromq-dev] PUB/SUB not sending data

2023-11-22 Thread Brett Viren via zeromq-dev
Hi Raúl, I feel that your questions may imply a deeper misunderstanding than what they ask directly so let me offer a few comments that hopefully gets to the real problems. Feel free to ask more. Of course the "while True" loop in the sender will send only identical copies of the same message