azure-service-bus-java icon indicating copy to clipboard operation
azure-service-bus-java copied to clipboard

add support for batch handler to MessageAndSessionPump

Open Blackbaud-MikeLueders opened this issue 6 years ago • 0 comments

Actual Behavior

MessageAndSessionPump does not support a batch interface

Expected Behavior

MessageAndSessionPump should support a batch handler.

The underlying MessageReceiver has a receiveBatch method that could be used to relay a batch of messages to a batch handler.

Our use case requires inspection of a database entity for each message received. Doing this per-message is not viable so we need to batch the call. Since the message is ack'd on return from the handler, we need a handler which accepts a collection of messages which are all ack'd on return. We can do this by using the more basic MessageReceiver but then we lose all functionality the pump gives us.

This issue suggests a specific solution (add batch support to MessageAndSessionPump) but really we just need support for a batch callback, however it's implemented.

Blackbaud-MikeLueders avatar Jul 21 '18 20:07 Blackbaud-MikeLueders