absmach / magistrala

Industrial IoT Messaging and Device Management Platform
https://www.abstractmachines.fr/magistrala.html
Apache License 2.0
2.48k stars 673 forks source link

Switch to NATS 2.0 #1135

Closed drasko closed 5 months ago

drasko commented 4 years ago

FEATURE REQUEST

  1. Is there an open issue addressing this request? If it does, please add a "+1" reaction to the existing issue, otherwise proceed to step 2.

  2. Describe the feature you are requesting, as well as the possible use case(s) for it. NATS 2.0 has been officially released for some time now. It brings many enhancemens, but most importnatnly streaming and QoS. This should be applied to Writers and assuetre that we are preventing message loss under high loads.

  3. Indicate the importance of this feature to you (must-have, should-have, nice-to-have). Must-have

drasko commented 4 years ago

Related to https://github.com/mainflux/mainflux/issues/1068

drasko commented 4 years ago

NATS 2.0 does not look ready yet (JetStreams are not yet finished).

Liftbridge is also and interesing in-pace replacement with streaming as an additional feature.

AryanGodara commented 1 year ago

https://github.com/AryanGodara/mainflux/tree/nats-jetstream-test/pkg/messaging/nats https://github.com/AryanGodara/mainflux/blob/nats-jetstream-test/docker/docker-compose.yml https://github.com/AryanGodara/mainflux/blob/nats-jetstream-test/docker/nats/nats.conf

^Changes I made to nats broker, to try out jetstream.

Links to pages I found, discussing the issue, similar to what we're facing (slow subscriber, message dropping) https://github.com/nats-io/nats-server/issues/217 https://github.com/nats-io/nats-server/issues/217 https://github.com/nats-io/nats.c/issues/317 https://github.com/nats-io/nats.go/issues/412

Useful Articles :- http://thinkmicroservices.com/blog/2021/jetstream/nats-jetstream.html https://medium.com/vlmedia-tech/distributed-message-streaming-in-golang-using-nats-jetstream-29f28be66dc6 https://medium.com/vlmedia-tech/distributed-message-streaming-in-golang-using-nats-jetstream-29f28be66dc6

dborovcanin commented 5 months ago

This issue has been resolved a long time ago.