0

I want to record messages streamed by NATS-streaming channel and stream it again when I want.

I want to create infrastructure to test my micro-service app. All micro-services are talking to each other using NATS-streaming and I would like to "record" stream of data, clean my database and stream it again to test if the system is consistent.

I saw that there is configuration for file-store or SQL-store but both are for storing the current state of NATS as described in the documentation. Also, I didn't find a way to "stream again" that data.

Is there any way to do it?

Thanks!

hanrok
  • 29
  • 1
  • 6

1 Answers1

1

When messages are published, they are stored in the channel (message log) they are published to. You can then start subscriptions that point to any sequence/time in that channel and replay messages. As for persistence, there is support for memory, file and SQL stores.

More on documentation:

Message logs

Subscriptions

Store implementations

I. Kozlovic
  • 796
  • 3
  • 3