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
1
vote
1 answer

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 am expecting to replay the stream messages in…
yenonn
  • 11
  • 2
1
vote
0 answers

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", "-i", streamUrl, '-f', 'mpegts', …
1
vote
0 answers

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 nats.js.api import RetentionPolicy NATS_HOST =…
bad programmer
  • 818
  • 7
  • 12
1
vote
0 answers

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().encode(creds)), in two place, both in main.ts: async…
1
vote
1 answer

NATS Based Resolver Integration - How to connect fine

I whant 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 (to process jwt by node self) but how the node should be…
1
vote
0 answers

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 to save it. I try it using the subscribe…
ETorre
  • 104
  • 3
1
vote
1 answer

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 doing this by generating static library out of…
Sivajee Battina
  • 4,124
  • 2
  • 22
  • 45
1
vote
2 answers

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 doing something wrong? I'm using the Pull…
1
vote
1 answer

Single processor of NATS subject

I have multi-tenant system, where each tenant is client with it's own view of the world, own entities, catalogs etc. Basically, I want to partition all "command" messages so that all commands corresponding to same tenant/client would be processed…
Twice_Twice
  • 527
  • 4
  • 16
1
vote
1 answer

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/natscli/releases Procedure Producer command : nats…
1
vote
0 answers

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 to start a NATS server that enforces this?
1
vote
0 answers

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/", test.DefaultTestOptions.Host, …
hankjy
  • 51
  • 5
1
vote
0 answers

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.client import Client as NATS class…
Takewood
  • 11
  • 3
1
vote
1 answer

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 is not clear how accounts, users and operators work, please…
Azazel
  • 27
  • 8
1
vote
0 answers

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. For example the subjects example.{1,N} should…
alexHX12
  • 403
  • 2
  • 9