Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dearmadman/amqpretry
Flexible AMQP message retry driver 😃
https://github.com/dearmadman/amqpretry
amqp amqp-replay amqp-retry go go-amqp-replay go-amqp-retry
Last synced: about 2 months ago
JSON representation
Flexible AMQP message retry driver 😃
- Host: GitHub
- URL: https://github.com/dearmadman/amqpretry
- Owner: DearMadMan
- Created: 2019-02-26T11:50:17.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-24T12:33:50.000Z (about 5 years ago)
- Last Synced: 2024-10-14T02:42:17.766Z (3 months ago)
- Topics: amqp, amqp-replay, amqp-retry, go, go-amqp-replay, go-amqp-retry
- Language: Go
- Size: 44.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Overview
![diagram](diagram.png)
## Install
```bash
go get -u github.com/DearMadMan/amqpretry
```## Usage
```go
op := amqpretry.Option{
DNS: "amqp://dev:dev@localhost:15666",
DeliverQueue: "deliver_queue",
FailureQueue: "deliver_failure_queue",
DeadLetterQueue: "deliver_dead_letter_queue",
DeadLetterExchange: "dead_letter_exchange",
InitQueueAndExchange: true,
Runnable: func(d *amqp.Delivery, retry *amqpretry.AMQPRetry) error {
// no need to 'ack' or 'nack' messages
// message will retry when error returned and policy allowedreturn nil
},
}retry, err := amqpretry.New(op)
if err != nil {
log.Fatal(err)
}retry.Start()
```## Reference
[lanetix/node-amqplib-retry](https://github.com/lanetix/node-amqplib-retry)## Feature
* [x] OnAckError
* [x] AfterAck
* [x] ErrorHeader
* [x] Rabbitmq lazy mode header support
* [x] Message Qos