1
4 Comments

Show IH: Cancellable and Reliable Distributed Task Queue in Go

https://github.com/dumbmachine/nq/

NQ ( Nats Queue ) is Go package for queuing and processing jobs in background with workers. Based on nats with a focus on cancel-ability of enqueued jobs.

submitted this linkon August 24, 2022
  1. 1

    any recommendation for in app library for golang with publish/subscribe model? nats etc. only make sense for distributed workload.

    1. 1

      Depend on what you mean by in-app, for ex if you have a microservices architecture in place, NATS would make a perfect sense to pub sub across services and it's still "in-app", generally it's a good idea to explore microservices and pub/sub as a pattern which NATS kind of the best implementation now, for ex if you are building an HR system and the leave module is getting much higher traffic than other modules, you would be able to scale it separately..

    2. 1

      I would suggest using go channels, if you wish to keep it simple. For a small application, they would be perfect.

      Nats can be used in simpler settings too, nats-server designed to be small and embed-able into applications. Let me know if you need help with that.

      If you set to using a library, while I have not used it https://github.com/vmihailenco/taskq seems to advertise in-memory broker for pubsub.

      1. 1

        Thanks for the quick reply. I am using go channels right now i wanted to check if there is something better used by other gophers :-) so i guess i will stick to go channels.