Stream / Jetstream persistence of topics

Hey HiveMQ-Team,

I am recently comparing message brokers.

Therefore I read your guide on persistence.
Nevertheless I am not sure whether my specific usecase is met.


------ Scenario ------

Imagine an AuthorizationServer (one or many instances), which publishes its rotating asymetric PublicKey on a messageQueue (e.g. topic = secKeys).

There are other instances in the service mesh - lets call them clients.
The clients need the PublicKeys for Token validation and do not know the location of the AuthorizationServers. They have to rely on the secKey topic for PublicKey retreival.

The keys are rotated weekly.
Hence, if a client is booted with bad timing (e.g. update), it will not receive a publickey for 5+ days although connected with HiveMQ-Persistence.


Is there a feature in HiveMQ which acts alike the “NATS JetStream” feature?
JetStream - NATS Docs

Messages are persisted for all clients (even NewBees) until:
… expiry on TimeToLive
… deletion on Acknowledge

Best wishes,
Parrot

Hi @PatientParrot

Welcome to the HiveMQ community! It’s great to have you here.

In response to your query, HiveMQ Community Edition doesn’t have built-in support for a feature exactly like NATS JetStream. However, HiveMQ does provide features for message persistence and retention.

For your specific use case, you might consider using the retained messages. For example, you could publish the rotating asymmetric PublicKey to the ‘secKeys’ topic as retained, to ensure that any client that subscribes to this topic, even if they missed an update due to being offline, will receive the latest PublicKey upon re-connect and re-subscribed.

I hope it helps,
Dasha from HiveMQ Team

Thanks for the fast reply - I’ll take a look next days :wink: