357 questions
1
vote
0
answers
80
views
How to organize message compression before publishing and decompression when reading on the consumer in the NATS message broker
colleagues!
- I use the "nats" message broker in my Golang project.
- Currently, when using "NATS," large messages aren't compressed at all, causing the producer to crash with an ...
0
1
answer
40
views
NATS MQTT error: "subscribe permission violation"
I have NATS 2.12, when my MQTT 3.1.1 clients connect and subscribe,
NATS rejects them and prints this message in the logs:
failed to initialize PUBREL processing: subscribe permission violation
...
1
vote
0
answers
36
views
NATS in Kubernetes CrashLoopBackOff when setting --max_payload to increase message size
I’m running a NATS cluster in Kubernetes using a StatefulSet.
My use case: I have microservices built with Moleculer that sometimes return large responses. By default, NATS limits messages to 1MB, but ...
2
1
answer
382
views
Changing NATS KV Store default TTL and allowing per-key TTL
https://github.com/nats-io/nats.js/pull/281 says that it adds support for per-message TTL in KV and JetStream. I have a couple of questions:
Is there a way to set a per-key TTL?
Once a KV store has ...
2
1
answer
111
views
Nats authcallout .net
i tried to authorize user in nats with authcallout but i am not sure what is wrong, also documentation is very ambigue.
I use Nats.JWT which is in preview as i know.
i did that for test.
I see that in ...
1
vote
1
answer
105
views
In NATS MQTT, how do I publish a retained message?
MQTT has retained messages: i.e. when someone subscribes to a topic — they immediately receive a message "pinned" to this topic.
I'm using NATS as MQTT server, and my app connects to it as a ...
2
0
answers
123
views
Nats stream for timeout management?
I have a system where I have certain processes running. We use nats key-value store for storing these processes. These processes will have an expiration date after which they need to be cancelled if ...
2
0
answers
60
views
How to remember stream position when subscribing to kv watcher?
Given the follow code, I can subscribe to a NATS KV Store
However each time the application starts, it will download all the data again. Since KV is an abstraction over a NATS stream, I'm hoping that ...
2
0
answers
282
views
NATs consumer's max delivery setting is confusing
I have a NATs stream that has a workerQueue retention policy. This stream also imposes some limits like max age and max bytes. I have seen 2 warnings now in the NATs docs which seem alarming:
They ...
2
0
answers
71
views
NATS communication issue between NestJS (gateway) and Spring Boot (microservice) using request-reply pattern
I'm implementing a microservices system where a NestJS gateway communicates with a Spring Boot microservice using NATS as the message broker.
The issue is that when I send a message from my NestJS ...
2
0
answers
61
views
NATS Import doesn't work from within specific stream
I have two accounts on the same server. Account-A and Account-B.
I've used nsc for creating imports and exports.
Account-A exports the subject "public.xyz.>" publicly to Account-B.
...
3
0
answers
161
views
NATS Consumer not reading all the messages
I am trying to build a NATS consumer that reads the last message from all subjects and then closes the connection. I need to do this periodically. However, my current implementation reads only up to ...
1
vote
0
answers
154
views
c# NATS auth callout Authentication
I want to implement out callout authentication on NATS. I have created a console application that listens to the $SYS.REQ.USER.AUTH topic. Based on the received username and password, I generate a JWT ...
0
0
answers
255
views
Nats cannot elect leader
I am totally new to Nats, didn't even heard of it before. Right now I have a project that I inherited.
We have an AWS ECS cluster configured with the base Nats docker image (5 nodes total).
Dockerfile ...
1
vote
0
answers
140
views
How to use NATS worker queue for consumer-provider architecture
I have an application where there are two services (multiple instance of each service) are communicating each other over NATS worker-queue type stream. However, I am facing the following two ...