Skip to content

v4.3.0

  • v4.3.0
  • f72117b
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
  • Choose a tag to compare

  • v4.3.0
  • f72117b
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@cody-greene cody-greene tagged this 28 Aug 01:48
Expose consumer statistics so users can track these values over time.

```typescript
interface Consumer {
  /** Some statistics about this Consumer */
  stats: {
    /** Total acknowledged messages */
    acknowledged: number
    /** Total messages rejected BasicNack(requeue=false) */
    dropped: number
    /** Size of the queue when this consumer started */
    initialMessageCount: number
    /** How many messages are in memory, waiting to be processed */
    prefetched: number
    /** Total messages rejected with BasicNack(requeue=true) */
    requeued: number
  }
}

// Example
const sub = rabbit.createConsumer(...)
console.log(sub.stats.acknowledged)
```
Assets 2
Loading