grabbit alternatives and similar packages
Based on the "Messaging" category.
Alternatively, view grabbit 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] -
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. -
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. -
amqp
An AMQP 0-9-1 Go client maintained by the RabbitMQ team. Originally by @streadway: `streadway/amqp` -
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
InfluxDB - Purpose built for real-time analytics at any scale.
Do you think we are missing an alternative of grabbit or a related project?
README
grabbit
A lightweight transactional message bus on top of RabbitMQ supporting:
1) Supported Messaging Styles - One Way (Fire and forget) - Publish/Subscribe - Aync Command/Reply - Blocking Command/Reply (RPC) 2) Transactional message processing 3) Message Orchestration via the Saga pattern 4) At least once reliable messaging via Transaction Outbox and Publisher Confirms 5) Retry and backoffs 6) Structured logging 7) Reporting Metrics via Prometheus 8) Distributed Tracing via OpenTracing 9) Extensible serialization with default support for gob, protobuf and avro
Stable release
the v1.x branch contains the latest stable releases of grabbit and one should track that branch to get point and minor release updates.
Supported transactional resources
1) MySql > 8.0 (InnoDB)
Basic Usage
- For a complete sample application see the vacation booking sample app in the examples directory
The following outlines the basic usage of grabbit. For a complete view of how you would use grabbit including how to write saga's and handle deadlettering refer to grabbit/tests package
import (
"github.com/wework/grabbit/gbus"
"github.com/wework/grabbit/gbus/builder"
)
Define a message
type SomeMessage struct {}
func(SomeMessage) SchemaName() string{
return "some.unique.namespace.somemessage"
}
Creating a transactional GBus instance
gb := builder.
New().
Bus("connection string to RabbitMQ").
Txnl("mysql", "connection string to mysql").
WithConfirms().
Build("name of your service")
Register a command handler
handler := func(invocation gbus.Invocation, message *gbus.BusMessage) error{
cmd, ok := message.Payload.(*SomeCommand)
if ok {
fmt.Printf("handler invoked with message %v", cmd)
return nil
}
return fmt.Errorf("failed to handle message")
}
gb.HandleMessage(SomeCommand{}, handler)
Register an event handler
eventHandler := func(invocation gbus.Invocation, message *gbus.BusMessage) {
evt, ok := message.Payload.(*SomeEvent)
if ok {
fmt.Printf("handler invoked with event %v", evt)
return nil
}
return fmt.Errorf("failed to handle event")
}
gb.HandleEvent("name of exchange", "name of topic", SomeEvent{}, eventHandler)
Start the bus
gb.Start()
defer gb.Shutdown()
Send a command
gb.Send(context.Background(), "name of service you are sending the command to", gbus.NewBusMessage(SomeCommand{}))
Publish an event
gb.Publish(context.Background(), "name of exchange", "name of topic", gbus.NewBusMessage(SomeEvent{}))
RPC style call
request := gbus.NewBusMessage(SomeRPCRequest{})
reply := gbus.NewBusMessage(SomeRPCReply{})
timeOut := 2 * time.Second
reply, e := gb.RPC(context.Background(), "name of service you are sending the request to", request, reply, timeOut)
if e != nil{
fmt.Printf("rpc call failed with error %v", e)
} else{
fmt.Printf("rpc call returned with reply %v", reply)
}
Testing
0) ensure that you have the dependencies installed: go get -v -t -d ./...
1) make sure to first: docker-compose up -V -d
2) then to run the tests: go test ./...