(Quick Reference)

prefetchCount

Purpose

Sets number of messages the consumer will prefetch.

Examples

static rabbitConfig = [
    queue: "example.queue",
    prefetchCount: 1
]

Description

Sets the QOS prefetch count property of the consumer's channel. By default, the consumer will fetch one message at a time. Increasing this value will increase the number of messages the consumer will queue up before it processes them.