Replies: 1 comment
-
Sorry, posted this to the wrong sub-project of NATS. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm very new to NATS, and I'm just trying to understand basic sending and receiving of messages. I have two demo python scripts running, one publishes a new message every 1 second and the other subscribes to the messages sent. However the subscriber never sees any of the published messages unless I do one of three things in the publish script:
If I do one of the first two, I see the messages in my subscribe script at a steady rate matching what the publish script is outputting. When I terminate the publish script, the subscribe script gets a flood of all messages at once.
I feel like I'm doing something wrong here. After searching some, it seems that calling flush after every publish isn't great practice and similarly it seems kind of silly to subscribe to my own message. Is there something additional I need to do to have the published messages sent out immediately. I appreciate any help you can provide.
I can post my example code if that is helpful, but the two scripts are essentially variations of the Getting Started script here: https://nats-io.github.io/nats.py/
Beta Was this translation helpful? Give feedback.
All reactions