rqueue
rqueue copied to clipboard
Pass multi message to handler using batchSize
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.
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?