matryer / vice

Go channels at horizontal scale (powered by message queues)
https://medium.com/@matryer/introducing-vice-go-channels-across-many-machines-bcac1147d7e2
Apache License 2.0
1.54k stars 79 forks source link

Async Behaviour varies between nsq and Nats #18

Closed joeblew99 closed 7 years ago

joeblew99 commented 7 years ago

nsq

nats


BTW since the API is meant to be agnostic to the underlying MQ, then can we use a string based Service factory i wonder :) I know its not proper golang, but well its a neat trick and will make testing / benching easier one might assume.

HeavyHorst commented 7 years ago

Nats is fire and forget with no persistence. That's by design. If you send messages and no one is there to receive the messages the messages are lost.

NSQ has a default mem-queue-size of 10.000 messages. I think that is the reason for your observed behavior.

NSQ-Doc:

-mem-queue-size int
    number of messages to keep in memory (per topic/channel) (default 10000)
joeblew99 commented 7 years ago

ok makes sense. thanks

joeblew99 commented 7 years ago

NATS provides a clustered persistence option these days. I think its out of beta too. Might be worth trying out. Apparently the API has no changes at all, so if true its more just a matter of supplying he ability to boot it.

HeavyHorst commented 7 years ago

I've created a pull request to support nats streaming: #32

joeblew99 commented 7 years ago

woooo :)

matryer commented 7 years ago

@joeblew99 are you happy?

joeblew99 commented 7 years ago

well i tried it and it worked well for me. SO yes. Will close this..