I made a Go example for JetStream Walkthrough - NATS Docs at https://github.com/hnakamur/nats-stream-example/tree/2c834d7d967f024348fbaa478eae18e9749431ba.
As a next step of my experiments, I tried to make a Go example for Request-Reply Walkthrough - NATS Docs but on a JetStream stream instead of a non-JetStream stream. My attempt is https://github.com/hnakamur/nats-stream-example/commit/149243b8bd30974a592061cd9d0c3a9b7f3f30fc.
However as soon as I ran my request subcommand, I got replies like msg.Data={"stream":"my_stream2", "seq":112}
, even though I did not run my reply subcommand.
Here are steps to reproduce:
$ nats-server -js
$ ./nats-stream-example stream-add --stream my_stream2 --subject foo2
$ ./nats-stream-example consumer-add --consumer pull_consumer2 --stream my_stream2
$ ./nats-stream-example request --subject foo2 --count 100
How can I do request-reply properly on a JetStream stream?