How to limit the number of messages from RabbitMQ to spark streaming

I am getting all the messages from the RabbitMQ when the connection is established. I want to limit the number of messages fetch the RabbitMQ.

Upvotes: 1

Views: 95

Answers (1)

Sachin Thapa
Sachin Thapa

Reputation: 3709

You can set following parameter

maxMessagesPerPartition - Maximum number of messages

See spark-rabbitmq for more details.

Hoping this helps.

Upvotes: 1

Related Questions