gs-messaging-gcp-pubsub
gs-messaging-gcp-pubsub copied to clipboard
MessageReceiver - Cannot Receive a batch of messages.
For using the spring-cloud-gcp-starter-pubsub to consume messages via Pull using PubSubInboundChannelAdapter. Our use case needs to process a batch of messages on the Message Receive handler.
We try consuming a batch of messages by wiring in below Message Handler. However, only one message is delivered at a time. Please note, a similar wired MessageReciever works for Kafka stream binder so we wanted to harness similar construct. Could you please help us with this need?
@ServiceActivator(inputChannel = "pubsubInputChannel")
public void messageReceiver(List<Message> messages) {
LOGGER.info("Message arrived! Payload Count: " + messages.stream().count()); // Always prints 1
processBatch(messages)
}