@ -12,7 +12,7 @@ Supported by [Boot.dev](https://boot.dev)
### Goal
The goal with `go-rabbitmq` is to provide *most* (but not all) of the nitty-gritty functionality of Streadway's AMQP, but to make it easier to work with via a higher-level API. `go-rabbitmq` is also built specifically for Rabbit, not for the AMQP protocol. In particular we want:
The goal with `go-rabbitmq` is to provide *most* (but not all) of the nitty-gritty functionality of Streadway's AMQP, but to make it easier to work with via a higher-level API. `go-rabbitmq` is also built specifically for Rabbit, not for the AMQP protocol. In particular, we want:
* Automatic reconnection
* Multithreaded consumers via a handler function
@ -30,31 +30,7 @@ go get github.com/wagslane/go-rabbitmq
Take note of the optional `options` parameters after the queue name. While not *necessary*, you'll *probably* want to at least declare the queue itself and some routing key bindings.
```go
consumer, err := rabbitmq.NewConsumer(
@ -73,8 +49,17 @@ err = consumer.StartConsuming(
return rabbitmq.Ack
},
"my_queue",
// spawns 10 goroutines to handle incoming messages
See the [examples](examples) directory for more ideas.
@ -181,6 +122,6 @@ My goal is to keep dependencies limited to 1, [github.com/rabbitmq/amqp091-go](h
## 👏 Contributing
I love help! Contribute by forking the repo and opening pull requests. Please ensure that your code passes the existing tests and linting, and write tests to test your changes if applicable.
I would love your help! Contribute by forking the repo and opening pull requests. Please ensure that your code passes the existing tests and linting, and write tests to test your changes if applicable.
All pull requests should be submitted to the `main` branch.