Questions tagged [nats-streaming-server]

NATS Streaming Server is a persistent messaging system running on top of the NATS messaging system written in the Go language. NATS is an open source messaging system (sometimes called message-oriented middleware). The NATS server is written in the Go programming language. Apcera develops and provides support for NATS.

NATS Streaming Server (now JetStream) is a persistent messaging system running on top of the NATS messaging system written in the Go language.

NATS is an open source messaging system (sometimes called message-oriented middleware). The NATS server is written in the Go programming language. Client libraries to interface with the server are available for dozens of major programming languages.

Apcera develops and provides support for NATS.

91 questions
1
vote
1 answer

NATS streaming server subscriber rate limiting and exactly once delivery

I am playing a bit with the NATS streaming and I have a problem with the subscriber rate limiting. When I set the max in flight to 1 and the timeout to 1 second and I have a consumer which is basically a Thread.sleep(1000) then I get multiple times…
KIC
  • 5,887
  • 7
  • 58
  • 98
1
vote
1 answer

NATS persistent message Java Client

Does anyone have experience using the NATS Streaming Server combined with a Java client? Specifically I can't figure out how to retrieve messages using the Java Client that are sent when a subscriber is offline. I can see using the Go client that I…
Kirby
  • 15,127
  • 10
  • 89
  • 104
0
votes
1 answer

I am using typescript and I am getting error TypeError: Class extends value undefined is not a constructor or null

I am building a microservice app which has a nats streaming setup, but when I create a instance of my listener class I get the error TypeError: Class extends value undefined is not a constructor or null [company] at Object.
0
votes
1 answer

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 actually adds it to the stream if I use an…
0
votes
0 answers

How to add JSON data to Jetstream strams?

I have a code written in node-nats-streaming and trying to convert it to newer jetstream. A part of code looks like this: import { Message, Stan } from 'node-nats-streaming'; import { Subjects } from './subjects'; interface Event { subject:…
best_of_man
  • 643
  • 2
  • 15
0
votes
1 answer

How to convert an environment variable declared inside a "yaml" file to something inside the ".env" file?

I have an environment variable file that is declared like following inside a deployment.yaml file: env: - name: NATS_CLIENT_ID valueFrom: fieldRef: fieldPath: metadata.name I am…
best_of_man
  • 643
  • 2
  • 15
0
votes
0 answers

List subjects for all the messages stored in NATS Stream (Jet Stream)

List subjects for all the messages stored in NATS Stream (Jet Stream). Lets say if we have 100 Messages in the Jet Stream under two subjects S1.S2.S3 & S1.S4. Some thing like SELECT DISTINCT Subjects FROM Stream where No.of.Messages > 0 should…
Balaji
  • 1
  • 2
0
votes
1 answer

Property 'on' does not exist on type 'Stan'.ts(2339)

I'm actually working on microservices project using a nats-streaming-server as a event-bus and i trying to write a publisher.ts file but i face this erreur PS: i'm writing this code with typescript Property 'on' does not exist on type…
0
votes
0 answers

What does a "Promise" mean?

I like to know what does a Promise mean? For example in the following code: import { Stan } from 'node-nats-streaming'; import { Subjects } from './subjects'; interface Event { subject: Subjects; data: any; } export abstract class…
0
votes
1 answer

Where are "process.env" properties defined?

I am reading a microservice NodeJS project that has some files like below: index.ts: import mongoose from "mongoose"; import { app } from "./app"; import { natsWrapper } from "./nats-wrapper"; import { OrderCreatedListener } from…
0
votes
2 answers

NatsError: stan: connect request timeout || port forwarding

my publisher.ts file: import nats from 'node-nats-streaming'; const stan = nats.connect('ticketing', 'abc', { url: 'http://localhost:4222', }); stan.on('connect', () => { console.log('Publisher connected to NATS'); }); }); my port…
0
votes
1 answer

How to pass token to NATS server using nats-pub.py script

I am new in NATS. Please can you provide how to pass token to NATS server using nats-pub.py script. python /tmp/nats-pub.py --creds ? -s nats://eventbus-default-stan-svc:4222 {label} -d '{json}' I can get NATS access configuration "config": { …
Eduard Nickel
  • 135
  • 1
  • 2
  • 13
0
votes
1 answer

Nats Spark connector: Error: Failed to load class

good afternoon! I'm newbie in nats/spark thing and I've been stuck for a few days. Would be greatfull for any tip. I'm using the https://github.com/Logimethods/nats-connector-spark-scala connector to read messages from a nats server. I'm using…
0
votes
2 answers

How to handle multiple update event when there is more then one replica of a pod

I have two services name Product and Order. Order table inside OrderDb has price and productId columns for storing product price and product id that ordered. Order services has 3 replica. Now, suppose a product is ordered and it's id 80, and a…
0
votes
1 answer

Testing NATS-streaming in Kubernetes with minimal effort

I wanted to test a very basic application for NATS-streaming on Kubernetes. To do so, I followed the commands from the official NATS-docs. It basically comes down to running kubectl apply -f…