redisqueue alternatives and similar packages
Based on the "Messaging" category.
Alternatively, view redisqueue alternatives based on common mentions on social networks and blogs.
-
machinery
An asynchronous task queue/job queue based on distributed message passing. -
Centrifugo
Real-time messaging (Websockets or SockJS) server in Go. -
NATS Go Client
A lightweight and high performance publish-subscribe and distributed queueing messaging system -
Confluent Kafka Golang Client
confluent-kafka-go is Confluent's Golang client for Apache Kafka and the Confluent Platform. -
NATS
A lightweight and highly performant publish-subscribe and distributed queueing messaging system. -
Mercure
Server and library to dispatch server-sent updates using the Mercure protocol (built on top of Server-Sent Events). -
Uniqush-Push
A redis backed unified push service for server-side notifications to mobile devices. -
Asynq
A simple, reliable, and efficient distributed task queue for Go built on top of Redis. -
zmq4
A Go interface to ZeroMQ version 4. Also available for version 3 and version 2. -
Gollum
A n:m multiplexer that gathers messages from different sources and broadcasts them to a set of destinations. -
mangos
Pure go implementation of the Nanomsg ("Scalable Protocols") with transport interoperability. -
emitter
Emits events using Go way, with wildcard, predicates, cancellation possibilities and many other good wins. -
messagebus
messagebus is a Go simple async message bus, perfect for using as event bus when doing event sourcing, CQRS, DDD. -
guble
A messaging server using push notifications (Google Firebase Cloud Messaging, Apple Push Notification services, SMS) as well as websockets, a REST API, featuring distributed operation and message-persistence. -
drone-line
Sending Line notifications using a binary, docker or Drone CI. -
RapidMQ
RapidMQ is a lightweight and reliable library for managing of the local messages queue -
go-notify
Native implementation of the freedesktop notification spec. -
go-res
Package for building REST/real-time services where clients are synchronized seamlessly, using NATS and Resgate. -
Commander
A high-level event driven consumer/producer supporting various "dialects" such as Apache Kafka. -
structured pubsub
Publish and subscribe functionality within a single process in Go. -
hare
A user friendly library for sending messages and listening to TCP sockets. -
jazz
A simple RabbitMQ abstraction layer for queue administration and publishing and consuming of messages. -
rmqconn
RabbitMQ Reconnection. Wrapper over amqp.Connection and amqp.Dial. Allowing to do a reconnection when the connection is broken before forcing the call to the Close () method to be closed.
Scout APM - Leading-edge performance monitoring starting at $39/month
Do you think we are missing an alternative of redisqueue or a related project?
Popular Comparisons
README
redisqueue
redisqueue
provides a producer and consumer of a queue that uses Redis
streams.
Features
- A
Producer
struct to make enqueuing messages easy. - A
Consumer
struct to make processing messages concurrenly. - Claiming and acknowledging messages if there's no error, so that if a consumer dies while processing, the message it was working on isn't lost. This guarantees at least once delivery.
- A "visibility timeout" so that if a message isn't processed in a designated time frame, it will be be processed by another consumer.
- A max length on the stream so that it doesn't store the messages indefinitely and run out of memory.
- Graceful handling of Unix signals (
SIGINT
andSIGTERM
) to let in-flight messages complete. - A channel that will surface any errors so you can handle them centrally.
- Graceful handling of panics to avoid crashing the whole process.
- A concurrency setting to control how many goroutines are spawned to process messages.
- A batch size setting to limit the total messages in flight.
- Support for multiple streams.
Installation
redisqueue
requires a Go version with Modules support and uses import
versioning. So please make sure to initialize a Go module before installing
redisqueue
:
go mod init github.com/my/repo
go get github.com/robinjoseph08/redisqueue/v2
Import:
import "github.com/robinjoseph08/redisqueue/v2"
Example
Here's an example of a producer that inserts 1000 messages into a queue:
package main
import (
"fmt"
"github.com/robinjoseph08/redisqueue/v2"
)
func main() {
p, err := redisqueue.NewProducerWithOptions(&redisqueue.ProducerOptions{
StreamMaxLength: 10000,
ApproximateMaxLength: true,
})
if err != nil {
panic(err)
}
for i := 0; i < 1000; i++ {
err := p.Enqueue(&redisqueue.Message{
Stream: "redisqueue:test",
Values: map[string]interface{}{
"index": i,
},
})
if err != nil {
panic(err)
}
if i%100 == 0 {
fmt.Printf("enqueued %d\n", i)
}
}
}
And here's an example of a consumer that reads the messages off of that queue:
package main
import (
"fmt"
"time"
"github.com/robinjoseph08/redisqueue/v2"
)
func main() {
c, err := redisqueue.NewConsumerWithOptions(&redisqueue.ConsumerOptions{
VisibilityTimeout: 60 * time.Second,
BlockingTimeout: 5 * time.Second,
ReclaimInterval: 1 * time.Second,
BufferSize: 100,
Concurrency: 10,
})
if err != nil {
panic(err)
}
c.Register("redisqueue:test", process)
go func() {
for err := range c.Errors {
// handle errors accordingly
fmt.Printf("err: %+v\n", err)
}
}()
fmt.Println("starting")
c.Run()
fmt.Println("stopped")
}
func process(msg *redisqueue.Message) error {
fmt.Printf("processing message: %v\n", msg.Values["index"])
return nil
}
*Note that all licence references and agreements mentioned in the redisqueue README section above
are relevant to that project's source code only.