Closed mbecker closed 4 years ago
You need to look at stan.go instead: https://github.com/nats-io/stan.go
Hi, thanks! Looks what I'm looking for. May I ask what is the different of "stan.go" and "nats.go". Why both client libraries?
@mbecker stan.go uses the nats.go client library to be able to use NATS Streaming, which has a similar API to NATS but enhanced with persistence of messages. If you are looking for persistence of messages then you could start with NATS Streaming, for real-time communications and request/response then you could start with NATS. Here is more info about the relation of NATS (nats.go) and NATS Streaming (stan.go or STAN): https://nats-io.github.io/docs/developer/streaming/
Hi @wallyqs , thanks for the detailed explanation. I highly appreciate that! I missed the following sentence on the page: "Sometimes the maintainers will refer to NATS as "nats core" and streaming as "stan" or "streaming"."
Sorry, please reply to this question now. I didn't see any more information about persistence in the document. Can stream persistence ensure that no message is lost? Many businesses have high requirements for persistence, which is a concern for programmers
I need the program to not lose any messages. Can NATS do this?
Yes, please visit https://docs.nats.io/nats-concepts/jetstream
Hi, as a NATS rookie I'm a little bit confused about the different version for the Go client library. I'm looking to have a QueueSubscribe with durable message subscripton.
Lookin at the following URLs I do see the code for that but with the nats.go clent that is not possible: (1) https://nats.io/blog/use-cases-for-persistent-logs-with-nats-streaming/
(2) https://github.com/nats-io/nats-streaming-server/blob/b549227a16bcf5cf7c7544e818249760266edcea/server/server_queue_test.go#L418
My code with the snippets from above produces the following error:
Am I missing anything? Thanks for your help!