Kafka, RabbitMQ, NATS.
kubectl apply - that's it.
Three fully managed messaging services on Hikube. Distributed event streaming, AMQP task queues, ultra-light pub/sub. Automatic replication, coordinated ZooKeeper, JetStream included.
3 services
Native HA
<1 ms
0 config
The right service for every pattern
Kafka, RabbitMQ and NATS meet distinct needs. The choice depends on volume, delivery model and durability.
Each service in detail
Kafka
Kafka organises messages into topics split into partitions, distributed across several brokers. Each partition is replicated according to the replicationFactor. If a broker fails, partitions are redirected to the available replicas. ZooKeeper coordinates leader election and stores cluster metadata.
Unlike RabbitMQ, Kafka keeps messages after they are consumed. Retention is configurable per topic (retention.ms). Several consumer groups can read the same topic independently, each keeping its own offset.
- Topics declared in the manifest
Partitions, replication factor, retention and cleanup policy configured directly in YAML. No need for external tools to create topics. - Managed ZooKeeper
3 ZooKeeper instances coordinate the cluster automatically. The odd quorum is guaranteed — a ZK node failure does not interrupt the service. - Retention and compaction
cleanup.policy: delete deletes messages after retention.ms. cleanup.policy: compact keeps only the last message per key, ideal for reference tables. - Optional external exposure
external: true creates one LoadBalancer per broker for off-cluster clients. Avoid without authentication configured.
kind: Kafka
metadata:
name: example
spec:
external: false
kafka:
replicas: 3
resourcesPreset: small
size: 10Gi
storageClass: replicated
zookeeper:
replicas: 3 # Toujours impair
resourcesPreset: small
size: 5Gi
storageClass: replicated
topics:
- name: my-topic
partitions: 3
replicas: 3
config:
retention.ms: "604800000" # 7 jours
cleanup.policy: "delete"
RabbitMQ
RabbitMQ routes messages via exchanges - producers publish to an exchange, which distributes to queues according to binding rules (direct, fanout, topic, headers). Consumers read from the queues. This flexible routing model makes RabbitMQ the best choice for complex workflows where the path of a message depends on its content.
With 3 replicas, RabbitMQ uses quorum queues (Raft protocol) : messages are replicated before confirmation, guaranteeing durability even if a node fails.
- Quorum queues by default
Raft replication on all 3 nodes. One leader node, two followers. Loss of one node without loss of messages. - Virtual hosts and isolation
Each vhost has its own exchanges, queues and permissions. Useful for separating environments (production, staging) on the same cluster. - Management UI included
Web interface on port 15672 - visualize queues, exchange bindings and throughput in real time. Accessible via port-forward or LoadBalancer. - Multi-protocol
AMQP 0-9-1, AMQP 1.0, MQTT and STOMP natively supported.
kind: RabbitMQ
metadata:
name: example
spec:
replicas: 3
resourcesPreset: small
size: 10Gi
storageClass: replicated
users:
admin:
password: "strongpassword"
vhosts:
production:
roles:
admin:
- admin
readonly:
- monitoring
staging:
roles:
admin:
- admin
readonly:
- monitoring
NATS
NATS is the lightest of the three — under 10 MB of RAM per instance, latency measured in microseconds. Messages are published on hierarchical subjects (e.g. orders.created) that subscribers listen to. Without JetStream, NATS works fire-and-forget: only subscribers connected at publication time receive the message.
JetStream adds persistence: messages are stored in streams with configurable retention, replay capability, and durable consumer groups with offset tracking. The cluster uses Raft consensus to replicate the streams.
-
Pub/Sub and Request/Reply
Asynchronous (pub/sub) and synchronous (request/reply) communication with the same broker. The request/reply pattern enables calls between microservices without HTTP. -
Queue groups for load balancing
Several instances of the same service in a queue group share the messages - each message is processed by a single member of the group. - Wildcards on subjects
orders.* matches one level, orders.> matches all levels. Powerful filtering without exchange configuration -
JetStream optional
Enable JetStream only if you need persistence. For ephemeral pub/sub (notifications, real-time metrics), basic NATS is lighter.
kind: NATS
metadata:
name: example
spec:
replicas: 3
resourcesPreset: small
storageClass: replicated
external: false
jetstream:
enabled: true
size: 10Gi
users:
user1:
password: mypassword
config:
merge:
max_payload: 16MB
write_deadline: 2s
What you no longer have to do
Kafka, RabbitMQ and NATS are three different distributed systems, but they share the same self-hosted problem: each requires dedicated expertise to run correctly in production. Sizing nodes, configuring quorum, testing failover, managing version upgrades without interrupting the message flow is engineering time that produces no business value.
On Hikube, the Kubernetes operator absorbs this load for all three services. You declare what you want - number of nodes, topics or vhosts, resources - and the operator provisions, replicates and falls over when something breaks. Changing the configuration is just changing a value in a YAML file and applying it.
Automatic quorum and consensus
ZooKeeper for Kafka, Raft for RabbitMQ and NATS JetStream. Leader-election mechanisms are configured and monitored without manual intervention.
Topics, vhosts and streams with the cluster
Partitions, retention, virtual hosts, JetStream streams declared in YAML in the same place. No separate initialisation script to maintain.
Scaling without interruption
Change the number of nodes in the manifest and apply. The operator adds the instances as a rolling update with no manual rebalancing and no downtime.
Auto-generated credentials
Passwords are created in a Kubernetes Secret at provisioning. Reference the Secret in your pods, no plaintext keys in your manifests or Git repositories.
Which service for which need?
The three services don't compete, they complement each other. Here are the concrete patterns in where each one stands out.
Application log pipeline
Ingest millions of log events from 50 microservices. 7-day retention, several independent consumers (Elasticsearch, ClickHouse, alerting). Each consumer reads from its own offset.
Event sourcing and audit trail
Each user action is published on a topic with cleanup.policy: compact. The current state is the sum of the events. The compact topic guarantees retention of the last state per key.
Email processing queue
Orders trigger a message in an emails.pending queue. Workers read the queue, send the email, and ACK the message. If a worker drops, the message is re-queued automatically.
Multi-destination event routing
A topic exchange routes orders.* events to the billing queue, orders.shipped events to the logistics queue, and # to an audit queue. One publish, many destinations.
Inter-microservice communication
Service A calls service B via NATS request/reply rather than HTTP. No service discovery, no load balancer. NATS routes directly to an available subscriber in the queue group.
IoT telemetry with JetStream
10,000 sensors publish metrics on sensors.>. JetStream stores 24 hours of data. Analysis services connect and replay history at startup. Useful after maintenance.
Event-driven, the foundation of modern architectures
Event-driven architectures have become the standard for modern distributed systems. Where synchronous APIs create fragile couplings, message brokers let services communicate without direct dependency. Each service produces or consumes events at its own pace.
Kafka structures high-volume data pipelines - logs, metrics, business events - with long retention and event replay to simplify auditing and disaster recovery. RabbitMQ ensures reliable routing of critical tasks: each message is processed exactly once, with guaranteed delivery. NATS reduces friction between microservices thanks to lightweight communication, microsecond latency and no heavy infrastructure.
In the managed version, your teams adopt these patterns without starting from scratch on the infrastructure. Same technology, same SDKs, same tools, deployed and operated by Hikube.
Decoupling and application resilience
One failing service doesn't drag down the others. Messages accumulate in the broker and are processed on recovery, with no loss or manual intervention.
IoT and edge computing
NATS ingests millions of sensor events with a minimal memory footprint. JetStream ensures data is not lost if a processing service restarts.
Data streaming and real-time analytics
Feed ClickHouse, Elasticsearch or your Grafana dashboards continuously from Kafka. The same topic can feed several independent consumers simultaneously.
Compatible with your stack
Kafka Connect, Confluent SDKs, pika, nats.go, nats.py. All existing clients work without modification. Point to the Kubernetes service, the rest is the same.
FAQ
Question about Managed Streaming & Messaging
Kafka or RabbitMQ, how to choose?
Kafka is made for high-volume streaming and long retention. Messages stay available after consumption, and several consumers can read the same topic independently. It's the natural choice for data pipelines, event sourcing and real-time analytics.
RabbitMQ is made for task queues and complex routing. Messages are consumed and deleted, with guaranteed acknowledgement. It's the natural choice for background processing, asynchronous workflows and systems where every message must be processed exactly once.
When should you use NATS rather than Kafka or RabbitMQ?
NATS is the right choice when you need light, fast communication between microservices, without the complexity of a heavyweight broker. Its sub-millisecond latency and minimal memory footprint (<10 MB per instance) make it the best choice for edge architectures, IoT, and request/reply communications between services.
If you need long-lasting persistence and large-scale event replay, Kafka is still more suitable. If you need complex routing with guaranteed ACK, RabbitMQ is more appropriate.
Why does ZooKeeper require an odd number of replicas?
Is NATS JetStream enabled by default?
Yes, JetStream is enabled by default on Hikube NATS clusters. Disable it only if you need a purely ephemeral pub/sub without persistence: you'll reduce the memory footprint and eliminate the need for a persistent volume. In production, keep JetStream activated to benefit from persistence, replay and durable consumer groups.
Note: even with JetStream enabled, messages are only persisted if a stream is configured to capture the relevant subjects.
What's the difference between partitions and replicationFactor in Kafka?
Partitions define parallelism: more partitions let more consumers read in parallel. Each partition is an ordered sequence of messages on a broker.
The replicationFactor defines durability: each partition is copied to this number of brokers. If a broker goes down, its partitions are served by the replicas. The replicationFactor cannot exceed the number of brokers.
Can I expose my cluster outside the Kubernetes cluster?
Yes, for Kafka and RabbitMQ via external: true, and for NATS via external: true. Kafka creates a LoadBalancer per broker, RabbitMQ exposes the AMQP (5672) and Management (15672) ports, NATS exposes the client port (4222).
External exposure makes the service reachable over the Internet: make sure you use strong passwords. Kafka has no default authentication on Hikube, so we strongly advise against exposing it without additional security configuration.