Menu

Spooler: A simple managed message queue

#golang#redditgolang#spooler#queue#message
Reading 0:00
15s threshold

Hi Gophers,

I'm Sergey. I am really happy to share Spooler ( https://spooler.sh ) -- a durable, fully managed message queue, inspired by the simplicity of Go channels.

Why? Whenever I needed a queue for something, it often felt that adding one would be a bigger project than the solution. Existing systems offered far more than I needed, while using a relational database usually meant inventing queue semantics on the go.

What I really wanted was just a send and recv with retries.

How it works: you send a message to the queue, you recv it leased; when the message processing is done you acknowledge it, if the lease times out, the message gets back to the queue to be delivered again or into the failed state on too many retries.

An ordinary producer looks like:

import "github.com/spoolersh/spooler-go" c := spooler.Client{ APIKey: "...", } res, err := c.Send(ctx, spooler.SendRequest{ Spool: "default", Queue: "orders", Data: []byte("hello, spooler!"), }) if err != nil { // Handle error.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.