Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 😃

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 allowed

return 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