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
2
votes
1 answer

Is it possible to redirect NATs Jetstream message to Elastic search

We use Nats jetstream for message distribution. I want to display messages delivered to Nats in UI. All message have pre defined common structure. Do we have file beat or logstash plugin to read the content (message) of NATS and redirect to ES. Or…
defender
  • 353
  • 2
  • 11
2
votes
2 answers

Hold subscribe method with custom handler nats golang

I am writing wrapper on top of nats client in golang, I want to take handler function which can be invoked from consumer once I get the message from nats server. I want to hold custom subscribe method until it receives the message from…
Ravat Tailor
  • 1,193
  • 3
  • 20
  • 44
2
votes
2 answers

Where does "has" come from in "this.has" expression?

I was reading Nats-Jetstream documentation that I encountered the following code: var createModel = require('jetstream').model; var Shape = createModel('Shape', function() { this.has('x', Number); this.has('y', Number); …
user20551429
  • 99
  • 1
  • 6
2
votes
0 answers

Server Cannot find NATS from inside Docker Container

For a project I have a Go Server running in a Docker container, a NATs Server, and a standalone client. The server tries to send messages through NATs. To connect to NATs, it uses the following code: var nc, err = nats.Connect(nats.DefaultURL) …
Johnney
  • 161
  • 1
  • 9
2
votes
0 answers

With nats can I export a stream from one account to different accounts which can import on the same topic?

I'm using nats and I'm not sure if it will be able to do what I'm attempting. My understanding is that accounts will allow me to have overlapping subjects since the subject space is not globally shared. What I'd like to be able to do is have…
Darren
  • 1,071
  • 1
  • 15
  • 39
2
votes
1 answer

How to receive heart beat messages from NATS Jetstream server

I have a running local NATS server with a stream named EVENTS and several subjects. In Golang, I am trying to subscribe with a push consumer using the idleHeartBeat option as described here. I searched a lot online and could not find a way to…
Yaya
  • 87
  • 9
2
votes
0 answers

Error listening on port: 127.0.0.1:2222, "listen tcp 127.0.0.1:2222: bind: address already in use"

I am trying to start a NATS server. Downloaded nats-server-v2.9.2-linux-amd64 and started the executable by terminal command. cd /home/nats/ ./server --a 127.0.0.1 --port 2222 The default 0.0.0.0 and port 4222 gave the same error. And this is…
sibert
  • 1,968
  • 8
  • 33
  • 57
2
votes
1 answer

NATS WEBSOCKET Python WebSocket Connection

I want to do the following thing: I want to make a websocket, which prints me all events about esports and I want to use https://sofascore.com I've inspected the network requests as usual and it seems that I need to send a Auth WebSocket Content…
CodingLion
  • 84
  • 9
2
votes
1 answer

Message still in nats limit queue after ack and term sent in Go

I tried writing a subscriber for a NATS limit queue: sub, err := js.SubscribeSync(fullSubject, nats.Context(ctx)) if err != nil { return err } msg, err := sub.NextMsgWithContext(ctx) if err != nil { if errors.Is(err, nats.ErrSlowConsumer)…
Woody1193
  • 7,252
  • 5
  • 40
  • 90
2
votes
0 answers

nats: error: consumer name already in use (10013)

An edit to maxAckPending in NATS CLI is throwing below error: nats: error: consumer name already in use (10013) Below command is being used: nats consumer edit --max-pending=25000
Kim Honoridez
  • 917
  • 2
  • 15
  • 28
2
votes
2 answers

Extended class method are not available when exported as library

I am trying to build a java library (streaming-client.jar) and use it in client microservice. Within this jar file I have one POJO class which is extending third party POJO classs @ConditionalOnClass({Options.class}) …
Rookie007
  • 1,229
  • 2
  • 18
  • 50
2
votes
0 answers

Typescript NATS Jetstream PullSubscribe Wildcard

I'm trying to create a nats consumer class that can listen to a stream subject that contains a wildcard. I was familiar with nats-streaming but since they decided to deprecate it for Jestream, I'm totally lost. For example I have a publisher, which…
T00rk
  • 2,178
  • 3
  • 17
  • 23
2
votes
1 answer

Why the NATS Golang client, if imported increases the executable size by 5MB?

I'm evaluating the NATS for my upcoming project. Why testing it I noticed that the size of the compiled executable goes from around 2MB to 7MB when I add the import line for the NATS client and use a few simple calls from the library. I'm using…
BenVida
  • 1,796
  • 1
  • 16
  • 25
2
votes
0 answers

nats jetstream: continue from last acknowledged message in correct order

What do I have? A producer who publishes a stream like this: - START_JOB 1 - do_task 1_1 - do_task 1_2 [...] - do_task 1_X - END_JOB 1 - START_JOB 2 - do_task 2_1 - do_task 2_2 - END_JOB 2 - START_JOB 3 - do_task 3_1 - do_task 3_2 [...] - do_task…
rmweiss
  • 716
  • 1
  • 6
  • 16
2
votes
0 answers

How to attach service.yaml while deploying NATS with HELM?

I am deploying NATS with HELM following the official documentation. To install I use the command: helm install my-nats nats/nats --values values.yaml My values.yaml contains auth information: auth: enabled: true nkeys: users: [ { …
Dmitry K.
  • 193
  • 1
  • 1
  • 8