rqueue icon indicating copy to clipboard operation
rqueue copied to clipboard

Pass multi message to handler using batchSize

Open ryukato opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. For now we're able to fetch multi messages using batchSize, and single message will be passed to executor.

Describe the solution you'd like We want a new feature to passing the batched messages to executor. In other words, we want to execute like below.

@RqueueListener(value = ["email-queue"], concurrency="1", batchSize = "3")
fun handleEmailMessage(messages: Collection<GenericMessage<Any>>) {
  println("received email message: $messages")
}

I appreciate if you let me know a way with current implementation or any thought about my request.

ryukato avatar Aug 31 '22 05:08 ryukato

This can be implemented but this will have specific issues like when one of the messages fails, should we retry the entire batch, or what to do? What's the advantage of using Batched listener?

sonus21 avatar Sep 03 '22 11:09 sonus21