NATS Blog

Welcome to the NATS Blog! We have content from NATS Maintainers, end-users, and community contributors. We always appreciate outside contributions so if you would like to contribute a blog post, see our Contributor's Guide for more information.

Infinite message deduplication in JetStream

JEAN-NOËL MOYNE — November 14, 2022

One feature, released in the v2.9.0 NATS server , that flew under the radar was the new DiscardNewPerSubject option on a stream. This blog post will describe this new feature as well as give a practical example of how it can be used to provide exactly-once message publication quality of service (QoS) through infinite deduplication that goes beyond the existing time-based deduplication feature of JetStream as well as many other streaming systems, such as Kafka. Read more...

The Matrix Dendrite Project move from Kafka to NATS

NEIL ALEXANDER — October 4, 2022

Matrix Dendrite Matrix is a federated protocol for real-time communications built on top of distributed data structures and Dendrite is an implementation of a Matrix homeserver built following a microservice architecture. It was originally intended to help us to overcome some load issues that were present in earlier monolithic implementations at the time. As a result, flexibility, performance, and scalability have been three critical areas of focus in our development. Read more...

NATS Server 2.9 Release

BYRON RUTH — September 16, 2022

The NATS core team and contributors are proud to announce the first release of the 2.9.x series! 🚀 Thank you to the 48(!) people who contributed to this release through GitHub issues, discussions, and pull requests, as well as the hundreds of people in the Slack community who asked questions, presented use cases, and tested early versions of the 2.9 release. ❤️ This release is a milestone for users leveraging JetStream with many improvements and a handful of new features. Read more...

Benchmarking Using NATS CLI Tool

JEAN-NOËL MOYNE — December 28, 2021

Benchmarks for throughput and speed have always been a desired data point for choosing messaging infrastructures but can be controversial due to the varying circumstances of the hardware, environment, and software version in use. Published benchmarks are often deemed not credible as the results can be skewed to improve performance and therefore become unreliable for critical infrastructure decision making. With this in mind, we always recommend performing benchmarks using an environment as close to your production use as possible. Read more...

Building Microservices with NATS

CHANAKA FERNANDO — November 18, 2021

Introduction Microservices are becoming a commodity in the enterprise world. The reason being the agility and the modularity it brings to the software development and delivery process. It is not that difficult to get started with microservices since there are enough tools and frameworks available to bootstrap the microservices-based application development. But there is a point that most teams who adopt microservices find it challenging to deal with. That is when the number of microservices goes beyond a certain limit (let’s say 25 in some cases), people start realizing the real challenges that microservices architecture brings to the table. Read more...

NATS.io .NET C# Client Library JetStream Pre-Release

SCOTT FAUERBACH — July 26, 2021

A pre-release of JetStream support has just been made available for the NATS .NET C# Client Library! The package NATS.Client 0.14.0-pre1 has been published on NuGet Gallery. You can follow progress and provide feedback via the Add Jetstream Connection/Client APIs GitHub Issue. Code Starting Points These are the important interfaces for you to get familiar with. IConnection has new methods which allow you to work with JetStream. CreateJetStreamManagementContext(...) gets an implementation of IJetStreamManagement , the interface that provides stream management functions. Read more...

NATS JetStream Deduplication for LinuxForHealth Blockchain Smart Contract Messaging

CAROLE CORLEY — July 19, 2021

Deduplication of messages is a key NATS JetStream feature needed by the LinuxForHealth open source project to implement blockchain smart contract messaging. Messaging from a smart contract allows the contract to notify NATS subscribers of key contract-based decisions. This is especially helpful for blockchain client applications that may not utilize a full blockchain node and can enable message-driven smart contract workflows. While messaging from a smart contract is desirable, every blockchain node runs the same smart contract and, as such, will publish the same NATS message. Read more...

JetStream for Key-Value Store Tech Preview

R.I. PIENAAR — July 15, 2021

Key-Value stores are specialised NoSQL databases that store values in a data bucket under a specific key. Key-Value stores are used extensively in modern cloud-native infrastructure, indeed etcd is the main storage engine of Kubernetes. In recent releases we have made several enhancements to JetStream with regard to wildcard subject support. In NATS Server 2.3.2 we have all of the features needed for NATS JetStream to be a powerful Key-Value store. Read more...

Using OCSP Stapling with the NATS Java Library

SCOTT FAUERBACH — July 6, 2021

You already know that the NATS Java library can connect to the NATS Server with TLS. The NATS Server now supports OCSP Stapling. To that end, I have built an example on how to set up the SSLContext to use with the NATS Java Library. Mileage may vary, and you will need to incorporate your own certificates and key stores, but this OCSP Example will get you most of the way there. Read more...

NATS Java Client Latency Benchmarking

SCOTT FAUERBACH — June 21, 2021

NATS Java Client Latency Benchmarking Many users have asked to see how the NATS Java client performs specifically in regard to latency. This blog will discuss using the NatsAutoBench program to run a latency test and how to generate a CSV file that can be used to make a histogram. The NatsAutoBench can run a variety of tests. This blog will focus only on the latency testing. Running the Latency Test You can run the latency test from an IDE or a command line, but you will need to build from the source code. Read more...