Skip to content

Batch process messages#22

Merged
cdekok merged 1 commit intomainfrom
batch-process-message
Mar 20, 2025
Merged

Batch process messages#22
cdekok merged 1 commit intomainfrom
batch-process-message

Conversation

@cdekok
Copy link
Owner

@cdekok cdekok commented Mar 20, 2025

Allow event listeners to batch process messages by using a list type, amount of messages to be processed will depend on event types and amount specified in the consumer.

/**
 * Batch process messages
 */
class BatchListener : EventListener {
    @EventHandler
    fun on(event: List<RecordCreated>) {
        logger.info { "handle record created ${event.size}" }
    }
}

@cdekok cdekok merged commit ae95f41 into main Mar 20, 2025
1 check passed
@cdekok cdekok deleted the batch-process-message branch March 20, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant