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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

KEDA NATS scaler not activating deployment

I am in the process of sampling KEDA for potential use in a project. I have set it up locally on a minikube K8s and I have created a ScaledObject using the below configuration: apiVersion: keda.sh/...
akortex's user avatar
  • 5,166
1 vote
0 answers
25 views

After application restart, total number of processed messages at the end is not same as input messages

I'm using nats-spark-connector ( https://github.com/nats-io/nats-spark-connector/tree/main/load_balanced ) to connect to NATS Jetstream and consume the message and process using Spark Java code. Below ...
VGH's user avatar
  • 373
1 vote
0 answers
19 views

Spark Streaming - After application restart, pulled message count is not correct

I'm using below Spark Java code to pull messages from NATS Jetstream private static void sparkNatsTester() { SparkSession spark = SparkSession.builder() ....
VGH's user avatar
  • 373
0 votes
1 answer
48 views

NATS-streaming - Where i can find clusterID? I watched tons of websites, but there's nowhere i could find how to know it

I'm moved to golang, so i started to research about base technologies. I found Nats streaming, downloaded some packages via command line(choco). And then after typing nats-streaming in cmd, i got some ...
HighQuality's user avatar
1 vote
0 answers
24 views

Modeling multiple, replicated consumers with Jetstream

I am trying to model my problem using NATS and Jetstream. Previously, I was using a plain MQTT broker to move messages between my services but we will be requiring temporal decoupling the consumers ...
Daniel Gonzalez's user avatar
1 vote
1 answer
40 views

Spark Streaming output mode to process only new messages

I'm using nats-spark-connector ( https://github.com/nats-io/nats-spark-connector/tree/main/load_balanced ) to connect to NATS Jetstream and consume the message and process using Spark Java code. Below ...
VGH's user avatar
  • 373
1 vote
1 answer
22 views

jsAccountLimits::MaxBytesRequired is a bool ean, should it be int64_t?

The NATS C Client structure jsAccountInfo has a member Limits that holds a jsAccountLimits structure. This structure in turn has a member MaxBytesRequired of which the datatype is a bool. Shouldn't ...
Walter's user avatar
  • 139
1 vote
1 answer
39 views

nats-spark-connector with Java giving an error

I'm using nats-spark-connector ( https://github.com/nats-io/nats-spark-connector/tree/main/load_balanced ) to connect to NATS Jetstream and consume the message and process using Spark Java code. Below ...
VGH's user avatar
  • 373
2 votes
0 answers
46 views

Timeout error in nats client connectivity for react native | Android ONLY

I am using Nats Client in my mobile application to connect to Nats server and publish/subscribe. For the iOS, same piece of code snippet is just working fine (Also the same snippet works in my ...
noobDev2410's user avatar
1 vote
0 answers
36 views

How did consumer handle the messages without start a new Thread in NATS-JetStream?

Recently I've been learning NATS-JetStream, and I came across some sample code on GitHub. Here is the simple java code of the NATS client: This code primarily accomplishes the following task: ...
KuanYu's user avatar
  • 11
1 vote
0 answers
51 views

NATS jetstream timeout inside anyio taskgroup

I have a problem with NATS jetstream. I set up everything locally with docker-compose (NATS with 3 Nodes, jetstream enabled). I have a fastapi application which should execute a state machine. I ...
Lucas Winkler's user avatar
2 votes
0 answers
61 views

What is the best way to deploy NATS using Azure

I have Multiple apps that are connected to NATS and need a NATS instance deployed on Azure. So far I have tried to deploy to the app service and it didn't work as expected because of the PORTs ...
BitState's user avatar
1 vote
0 answers
41 views

How to get delivery count of message node nats streaming server

While using node nats streaming server there is once scenario where I want to prevent message from getting again and again in subscriber in case of error from service There could be a possible ...
Vaibhav Mittal's user avatar
1 vote
0 answers
42 views

go: how to abstract queue message fetch with an interface for mocking and testing, with channel return type?

I'm using a NATS JetStream backend as a work queue, but I'm now trying to write an interface that supports common queue methods like publish and fetch, to come up with a mockable and testable solution ...
pwntr's user avatar
  • 75
2 votes
1 answer
74 views

Node server not being able to connect to NATS server

I'm trying to connect to a NATS server via nodejs and I'm running into issues with the cert. The NATS server is behind a company VPN. Not sure if that is the issue. I can connect to the server itself ...
Gurkmeja101's user avatar
2 votes
2 answers
46 views

The third node of the nats-streaming cluster does not rise in docker swarm

My project uses nats-streaming cluster. I want to raise it on three servers using docker swarm, but only 2 are successfully raised. (docker service ls output) A non-working node outputs the following ...
Кирилл Сыроежкин's user avatar
1 vote
0 answers
115 views

Debezium UI for nats jet stream

We are using NATS Jetstream for streaming messages from debezium connector. I want to create UI for debezium to see changes. I have seen in the documentation about this link, here they have mentioned ...
Bunny's user avatar
  • 11
1 vote
1 answer
381 views

nats message queue - ack a message from jetstream consumer in a separate request

Is it possible to manually acknowledge delivered message stream sequence in a separate request (independent on the request receiving the message) to the nats server? Usually you would receive messages ...
user2694295's user avatar
1 vote
1 answer
267 views

How can I make nats stream replay messages

I have a jetstream-enabled, limited-policy stream on nats. All messages stream fine for couple days. Now, I am wishing to replay the messages to the consumer/subscriber. How can I do it? Thank you. I ...
yenonn's user avatar
  • 11
1 vote
0 answers
130 views

How to stream to NestJS if the data is transmitted through a NATS broker?

I have an rtsp to mpegts streamer (ffmpeg wrapped in Express for publishing) that streams by publish to a NATS Jetstream. const options = [ "-rtsp_transport", "tcp", ...
О. Войтенко's user avatar
1 vote
0 answers
106 views

nats server not distributing tasks to multiple processes in parallel

I am trying to use nats for job queuing. I want it as an alternative to celery+rabbitmq for my use-case. I have two scripts. Producer Script that populates the queue. producer.py import nats from ...
bad programmer's user avatar
2 votes
0 answers
71 views

NATS streaming server breaks when subscribing a listener in Node JS

I'm trying to subscribe a listener to NATS streaming server to communicate two NodeJS pods in Kubernetes, but NATS prompts the following error: [be-contact-form] /usr/src/app/node_modules/nats/lib/...
Manel's user avatar
  • 81
1 vote
0 answers
49 views

Transport.NATS for NESTjs fine creds launching

Try to create "Hybrid app" REST + NATS from official docs: https://docs.nestjs.com/faq/hybrid-application but if add cred options like authentiacator: credsAuthenticator(new TextEncoder()....
Fedor Tykmakov's user avatar
2 votes
0 answers
100 views

Python - Fastapi nats client timeout issue

I have a fastapi application running as a microservice which is using the python nats client to publish messages. But every time I do a nats request this way, I'm getting request timeout, but this ...
Sriram Sathyanarayanan's user avatar
0 votes
1 answer
299 views

How to connect a Dockerized NATS client to a NATS server running in another Docker container?

I have two Docker containers, one running the NATS I/O server and the other acting as a client. Both containers are isolated from each other. I want the client to connect to the NATS server, but I'm ...
Mephisto_08's user avatar
1 vote
1 answer
157 views

NATS Based Resolver Integration - How to connect fine

I want to use "NATS Based Resolver Integration" from this doc https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_intro/jwt/resolver#nats-based-resolver-integration (...
Fedor Tykmakov's user avatar
2 votes
0 answers
61 views

Nats try to add a consumer attached to $JS.EVENT.ADVISORY.CONSUMER.MAX_DELIVERIES

I'm using jetstream with interest approach. I see that to create a dead-letter, one of the approach is binding to event of $JS.EVENT.ADVISORY.CONSUMER.MAX_DELIVERIES and call to get particular message ...
ETorre's user avatar
  • 124
0 votes
1 answer
132 views

How do I make NATS continuously listen for messages?

If I use the following code NATS listens and processes the first message but not new messages after that. How do I make the sub not close and continuously process messages? The code below is from the ...
Jason Leach's user avatar
  • 4,009
1 vote
1 answer
201 views

NATS Core + Nats C Client message loss

I suffer message loss with NATS publish (Core, not Jetstream yet). Using NATS CLI on Windows to subscribe as sub ">" Using NATS server on Linux Ubuntu on local LAN. Application on Windows ...
Walter's user avatar
  • 139
2 votes
2 answers
97 views

How to use nats.c library inside iOS/Swift Project?

we are trying to use nats library for iOS/Swift Project. We haven’t gotten a direct swift library to integrate with iOS project. Hence, we are trying to use nats.c library inside our project. We are ...
Sivajee Battina's user avatar
1 vote
2 answers
1k views

Can I make multiple consumers for multiple subjects on one stream on NATS JetStream?

I am trying to make it so that I can add multiple subscriptions to multiple subjects on a single stream using NATS JetStream. My question is, is this possible? Have I gone the right direction or am I ...
Umar Manzoor's user avatar
0 votes
1 answer
43 views

Will this Consumer still be added to the stream if I use an underscore in the if statement?

I am writing a script that connects to a NATS server. In this code I am trying to make it so that I can add multiple consumers to multiple different streams if needed, my question is whether or not it ...
Umar Manzoor's user avatar
1 vote
1 answer
92 views

Single processor of NATS subject

I have multi-tenant system, where each tenant is client with its own view of the world, own entities, catalogs etc. I want to partition all "command" messages so that all commands ...
Twice_Twice's user avatar
1 vote
1 answer
366 views

The NATS client for NodeJS is very slow

I performed a latency test with the NATS benchmark tool, using two types of NATS clients. A) The native NATS client (NATS CLI), which can be downloaded and installed from https://github.com/nats-io/...
Samaritain Sim'S's user avatar
1 vote
0 answers
22 views

How can I enforce TLS1.3 on my NATS server and reject TLS1.2 connections?

I cannot find any documentation how to start a NATS server and enforce TLS1.3. I want the NATS server to reject any connection attempts using TLS1.2 and only accept TLS1.3 connections. Is there a way ...
kernelpanda's user avatar
1 vote
0 answers
25 views

nat-io's graft library needs all raft node communicate with central nats server(developed by nats-io)

the code I referenced currently was below. func createNatsNodes(t *testing.T, name string, numNodes int) []*Node { opts := &nats.DefaultOptions url := fmt.Sprintf("nats://%s:%d/", ...
hankjy's user avatar
  • 61
1 vote
0 answers
184 views

How to connect multiple clients simultaneously to a websockets server that uses NATS?

Does anyone know why only one client is able to connect at the same time to a websockets server that uses NATS? Here is my code: subscribehandlernats.py import asyncio import signal from nats.aio....
Takewood's user avatar
1 vote
1 answer
155 views

How can I deny permission publish messages for account?

The NATS documentation is a bit unclear on how to set up permissions for accounts, I used the following nsc edit account account_name --deny-pub ">" but I could still send messages. It ...
Azazel's user avatar
  • 27
2 votes
1 answer
63 views

RAII when using ascyc c library

I have an RAII wrapper around the cnats library. We don't need to understand the details of cnats. There are just two important piecies. cnats is the C client for communicating with a NATS message ...
John Sallay's user avatar
1 vote
0 answers
192 views

NATS subject subscribers limit

How can I limit NATS subscriptions on a specified subject? My use case would be to distribute messages on a partitioned network so I need to limit subscription on a determined subject to exactly one. ...
alexHX12's user avatar
  • 403
2 votes
0 answers
231 views

Can NATS client connect to NATS server via a public proxy server?

I want to use NATS to allow communication between a client and a server, but I want to use a public proxy server for the connection. However, it seems that the NATS API does not provide an option to ...
marslin's user avatar
  • 21
1 vote
1 answer
343 views

Permissions error when running command on nats-box in cluster

I'm using the nats-box deployed to a local cluster, to check the status of the nats server thats running in the same cluster. When running nats server commands in the shell of the nats-box I'm getting ...
some_id's user avatar
  • 29.5k
0 votes
0 answers
174 views

Strange behaviour with nats.io clustering in docker swarm

I have a test swarm made by one node and I'm trying to deploy a nats cluster behind swarm balancer. I have created a seed service with one instance which initialize the cluster and a two node service ...
Simone Pelaia's user avatar
1 vote
0 answers
62 views

NATS.io Unity Videogame (player spawning and position tracking)

I am developing a project which consists in a multiplayer videogame implemented with NATS.io messaging system (https://nats.io/) in Unity. I am trying to spawn a player prefab in the map whenever a ...
Jesús García's user avatar
1 vote
0 answers
271 views

NATS Warning: Internal subscription on "$JS.API.CONSUMER.INFO.stream_name.consumer_name" took too long: 2.265209187s

I have up to 10 subscribers who connect to the NATS server and continuously fetch the messages.The basic code which I use to subscribe the messages is: IJetStreamPullSubscription sub = js....
Varsh's user avatar
  • 433
1 vote
0 answers
44 views

Messaging Broker for High Latency/Low Connectivity Mesh/Geographically dispersed nodes

I am looking for some advice on a clustered or federated broker to use in a given scenario. I will try to describe the problem with what I think is going to be a few critical decision points/...
Nashirak's user avatar
1 vote
0 answers
55 views

NATS custom metrics

All, Is anyone aware, how can to get the below custom metrics from NATS. connections to core nats subject(consumers, publishers, in/out messages from subjects) Connections on streams(consumers, ...
KhalDrogo's user avatar
1 vote
0 answers
288 views

How to claim multiple exisiting pvc's AFTER initial creation made by NATS helm?

I have a NATS Helm Chart that when initially ran will build the needed statefulsets and pvc's (provided I supply the pv's) 3 Replica Statefulsets (created by the helm chart) nats-0 nats-1 nats-2 3 ...
ASG4's user avatar
  • 189
1 vote
1 answer
205 views

Creating one client per each consumer

In one my projects I need to implement health checks for microservices. NATS already has an Http endpoint for that but it only provides information about connected clients and not consumers. So I have ...
Arnold Zahrneinder's user avatar
7 votes
0 answers
2k views

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 ...
Arnold Zahrneinder's user avatar

1
2 3 4 5 6