Skip to content

Commit

Permalink
\segmentio#25 Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave committed Mar 11, 2021
1 parent 76aebec commit b96941b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ If a message is discarded entirely because it does not pass your `shouldRetry` l

If the queue is reclaiming events from an abandonded queue, and sees duplicate entries, we will keep the first, and discard the rest, emitting a `duplication` event for each.

If a message is discarded because the queue exceeds `maxItems`, the queue will emit an `overflow` event.

### `processed`

```javascript
Expand All @@ -171,6 +173,13 @@ queue.on('discard', function(item, attempts) {
```javascript
queue.on('duplication', function(item, attempts) {
console.error('discarding message %O due to duplicate entries', item, attempts);
```
### `overflow`
```javascript
queue.on('overflow', function(item, attempts) {
console.error('discarding message %O after %d attempts due to queue overflow', item, attempts);
})
```
Expand Down

0 comments on commit b96941b

Please sign in to comment.