Open mteodor opened 4 years ago
@mteodor can you please give links to nc.ChanSubscribe
and SubscribeSync/NextMsg
and explain better the concept and what do you want to achieve here.
We are not using Go channels here, and I am not sure that this is relevant or necessary for our use-case
If you have a large number of large messages and writing takes a long time you may lose messages.
With ChanSubscribe
you will create a buffer for messages and process messages at pace.
These functions are using Go buffered channels, right?
This might be possible, because our Writers are all written in Go.
However, I would like here that we consider using NATS 2.0 and researchtheir QoS, i.e. queue and streaning that NATS 2.0 brings.
Currently Writer's NATS
msgHandler()
is consuming NATS messages synchronosly with delivering message. It should be changed so that it follows patternof passing things into a queue and then having a number of workers
It can be automated with by using nc.ChanSubscribe or the SubscribeSync/NextMsg pattern