A Java client library for the NATS messaging system, enabling high-performance publish-subscribe and request-reply communication.
NATS Java client is a library that allows Java applications to communicate using the NATS messaging protocol. It provides APIs for publishing messages, subscribing to subjects, and building distributed systems with features like streaming via JetStream. The client handles connection management, security, and fault tolerance, enabling developers to focus on application logic.
Java developers building microservices, event-driven architectures, or real-time systems that require lightweight, high-performance messaging. It's suitable for teams using NATS as their messaging backbone in cloud-native or on-premises environments.
Developers choose this client for its comprehensive NATS protocol support, including JetStream for persistence, alongside robust connection handling and security features. It's the official Java implementation from the NATS project, ensuring compatibility and active maintenance.
Java client for NATS
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Covers both core NATS for lightweight pub/sub and JetStream for persistent streaming, including wildcard subscriptions and request-reply patterns, as outlined in the key features.
Handles connection failures with configurable retry logic and server discovery, ensuring resilience in distributed systems without manual intervention.
Supports TLS encryption, NKey authentication, and credential-based auth, with flexible setup via Options.Builder for secure connections in production.
Introduced a streamlined interface in version 2.16.14 for easier stream and consumer management, reducing boilerplate code for common operations.
Advanced features like TLS and JetStream require non-trivial setup with numerous options, and subject validation changes (e.g., in 2.25.1) can introduce breaking adjustments.
Consumer info calls are noted as expensive for servers under load, and TLS performance may lag without external libraries like Conscrypt, impacting throughput.
Relies on external dependencies for NKey support and has specific GraalVM configuration needs, adding complexity to deployment and native image builds.