Popularity
4.4
Stable
Activity
0.0
Stable
97
9
24
Programming language: Go
License: MIT License
Tags:
Messaging
Latest version: v3.0.0
rabbus alternatives and similar packages
Based on the "Messaging" category.
Alternatively, view rabbus alternatives based on common mentions on social networks and blogs.
-
sarama
DISCONTINUED. Sarama is a Go library for Apache Kafka. [Moved to: https://github.com/IBM/sarama] -
Centrifugo
Scalable real-time messaging server in a language-agnostic way. Self-hosted alternative to Pubnub, Pusher, Ably. Set up once and forever. -
Benthos
DISCONTINUED. Fancy stream processing made operationally mundane [Moved to: https://github.com/redpanda-data/connect] -
Mercure
πͺ½ An open, easy, fast, reliable and battery-efficient solution for real-time communications -
APNs2
β‘ HTTP/2 Apple Push Notification Service (APNs) push provider for Go β Send push notifications to iOS, tvOS, Safari and OSX apps, using the APNs HTTP/2 protocol. -
amqp
An AMQP 0-9-1 Go client maintained by the RabbitMQ team. Originally by @streadway: `streadway/amqp` -
Uniqush-Push
Uniqush is a free and open source software system which provides a unified push service for server side notification to apps on mobile devices. -
Chanify
Chanify is a safe and simple notification tools. This repository is command line tools for Chanify. -
PingMe
PingMe is a CLI which provides the ability to send messages or alerts to multiple messaging platforms & email. -
emitter
Emits events in Go way, with wildcard, predicates, cancellation possibilities and many other good wins -
Bus
πMinimalist message bus implementation for internal communication with zero-allocation magic on Emit -
go-mq
Declare AMQP entities like queues, producers, and consumers in a declarative way. Can be used to work with RabbitMQ. -
Ratus
Ratus is a RESTful asynchronous task queue server. It translated concepts of distributed task queues into a set of resources that conform to REST principles and provides a consistent HTTP API for various backends. -
RapidMQ
RapidMQ is a pure, extremely productive, lightweight and reliable library for managing of the local messages queue
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
Promo
coderabbit.ai

Do you think we are missing an alternative of rabbus or a related project?
README
Rabbus π β¨
- A tiny wrapper over amqp exchanges and queues.
- In memory retries with exponential backoff for sending messages.
- Protect producer calls with circuit breaker.
- Automatic reconnect to RabbitMQ broker when connection is lost.
- Go channel API.
Installation
go get -u github.com/rafaeljesus/rabbus
Usage
The rabbus package exposes an interface for emitting and listening RabbitMQ messages.
Emit
import (
"context"
"time"
"github.com/rafaeljesus/rabbus"
)
func main() {
timeout := time.After(time.Second * 3)
cbStateChangeFunc := func(name, from, to string) {
// do something when state is changed
}
r, err := rabbus.New(
rabbusDsn,
rabbus.Durable(true),
rabbus.Attempts(5),
rabbus.Sleep(time.Second*2),
rabbus.Threshold(3),
rabbus.OnStateChange(cbStateChangeFunc),
)
if err != nil {
// handle error
}
defer func(r Rabbus) {
if err := r.Close(); err != nil {
// handle error
}
}(r)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
go r.Run(ctx)
msg := rabbus.Message{
Exchange: "test_ex",
Kind: "topic",
Key: "test_key",
Payload: []byte(`foo`),
}
r.EmitAsync() <- msg
for {
select {
case <-r.EmitOk():
// message was sent
case <-r.EmitErr():
// failed to send message
case <-timeout:
// handle timeout error
}
}
}
Listen
import (
"context"
"encoding/json"
"time"
"github.com/rafaeljesus/rabbus"
)
func main() {
timeout := time.After(time.Second * 3)
cbStateChangeFunc := func(name, from, to string) {
// do something when state is changed
}
r, err := rabbus.New(
rabbusDsn,
rabbus.Durable(true),
rabbus.Attempts(5),
rabbus.Sleep(time.Second*2),
rabbus.Threshold(3),
rabbus.OnStateChange(cbStateChangeFunc),
)
if err != nil {
// handle error
}
defer func(r Rabbus) {
if err := r.Close(); err != nil {
// handle error
}
}(r)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
go r.Run(ctx)
messages, err := r.Listen(rabbus.ListenConfig{
Exchange: "events_ex",
Kind: "topic",
Key: "events_key",
Queue: "events_q",
DeclareArgs: rabbus.NewDeclareArgs().WithMessageTTL(15 * time.Minute).With("foo", "bar"),
BindArgs: rabbus.NewBindArgs().With("baz", "qux"),
})
if err != nil {
// handle errors during adding listener
}
defer close(messages)
go func(messages chan ConsumerMessage) {
for m := range messages {
m.Ack(false)
}
}(messages)
}
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Badges
GitHub @rafaeljesus · Medium @_jesus_rafael · Twitter @_jesus_rafael