Questions tagged [nats.io]

NATS is a simple, secure, and highly performant open source messaging system for cloud native applications with clients for Go, Python, Ruby, Node, Deno, Java, C#, C, and more.

NATS is a simple, secure, and highly performant open source messaging system for cloud native applications with clients for Go, Python, Ruby, Node, Deno, Java, C#, C, and more.

Links

281 questions
23
votes
3 answers

Which option is more suitable for microservice? GRPC or Message Brokers like RabbitMQ

I want develop a project in microservice structure. I have to use php/laravel and nodejs/nestjs What is the best connection method between my microservices. I read about RabbitMQ and NATS messaging and also GRPC Which option is more suitable for…
Mohammad Honarvar
  • 231
  • 1
  • 2
  • 6
12
votes
3 answers

Performance of Nats Jetstream

I'm trying to understand how Nats Jetstream scales and have a couple of questions. How efficient is subscribing by subject to historic messages? For example lets say have a stream foo that consists of 100 million messages with a subject of…
d80tb7
  • 863
  • 2
  • 9
  • 20
10
votes
3 answers

Does gRPC vs NATS or Kafka make any sense?

For a long time, when it comes to the microservice architecture, NATS and Kafka are the first options that come to my mind. But recently I found this gRPC template in dotnet core and that grasped my attention. I read a lot about it and watched a lot…
Arnold Zahrneinder
  • 4,788
  • 10
  • 40
  • 76
9
votes
2 answers

NestJS NATS request-response

I'm trying to use NestJS and the NATS microservice. There is good documentation for setting up a basic request-response. What I did is the following: Ran a local NATS server. Set up my main.ts to connect to the server: async function bootstrap() { …
rhlsthrm
  • 769
  • 1
  • 12
  • 23
8
votes
1 answer

Does NATS Jetstream provide message ordering by a key?

I am new to NATS Jetstream and I have been reading their official documentation (https://docs.nats.io/jetstream/jetstream) to understand its concepts and compare it with Kafka. One of the major use cases I have, is to solve for message/event…
User_Targaryen
  • 4,125
  • 4
  • 30
  • 51
7
votes
0 answers

NATS Object Store or Key Value Store vs Redis Cache

We are currently using Redis behind NATS to do caching which is a standard practice. However, I have come across this idea that we can take advantage of the Object Store or Key Value features in NATS to implement caching natively. However, I know…
Arnold Zahrneinder
  • 4,788
  • 10
  • 40
  • 76
7
votes
1 answer

Get list of subjects in NATS streaming server

I'm looking for a way to display all the subjects that currently exist on a NATS Streaming Server during operation. Have thoroughly looked through documentation but have been unable to find a mention of this so far. Is there a way to find a list of…
Nobo
  • 71
  • 1
  • 2
6
votes
1 answer

NATS Request Reply - How it works?

I am new NATS. Not sure how NATS request reply works. As per my understanding, this pattern can be use for bi-directional communication but questions is, Does it works between same message id/thread ? If not, can't we use two different queue for the…
DSA
  • 720
  • 2
  • 9
  • 30
5
votes
0 answers

Nats Name vs Durable Name

In Nats go client we can setup a consumer with js.AddConsumer(). This function takes a ConsumerConfig. // ConsumerConfig is the configuration of a JetStream consumer. type ConsumerConfig struct { Durable string …
5
votes
1 answer

NATS - Subscribe to event with async handle functions

I am using NATS mechanism to publish events between different processes, when I subscribe to a topic and supply async action that handles the topic if an exception has been thrown from the action that handles the topic I can't catch it because I am…
nive-2510
  • 63
  • 3
5
votes
1 answer

Nats Jetstream Exactly Once Delivery

I want to implement an exactly once delivery system with Nats Jetstream. Documentation says that Jetstream has this option, but there is no samples or details about that how it's work and how clients can implement this. I know that in publisher side…
bulwark
  • 53
  • 1
  • 4
5
votes
1 answer

Horizontal scaling based on the number of events published in NATS server

I am new to both Nats and Kubernetes. I created a python console application that is subscribed to nats-server and wrapped in a pod with a Deployment object in Kubernetes. Now I want to auto-scale the pod based on the number of events published in…
Sazzad
  • 773
  • 11
  • 22
5
votes
1 answer

Is there a NATS Web UI tool to monitor messages?

Is there any tool available to monitor the actual messages published through a NATS queue? For a presentation I need to display the messages displayed through a microservice architecture and it would be nice to do that via an existing solution in…
patreu22
  • 2,988
  • 4
  • 22
  • 31
4
votes
1 answer

How to pass remote parent span properly using NATS?

I have a dummy example on this repo I tried to pass current span context to a remote one so it would show the trace properly, what I've done: go func() { _, span := otel.Tracer("natsC").Start(context.Background(), "publish") defer…
Kokizzu
  • 24,974
  • 37
  • 137
  • 233
4
votes
0 answers

I have just started to use nats with my NestJs Microservices, after npm i nats and recompiling my app I receive this error "stream.on"

This is the error in my cmd window after trying to run a npm start C:\Users\Desktop\app\ms-users\node_modules\@nestjs\microservices\server\server-nats.js:85 stream.on(constants_1.ERROR_EVENT, (err) => this.logger.error(err)); …
1
2 3
18 19