Skip to content

batching policy confusion #2967

Answered by mihaitodor
pmak-852 asked this question in Q&A
Oct 28, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hey @pmak-852 👋

The input batch size is 50 messages while the output is 20. i am expecting the output batch size is 20, which is not the case, it says 50. When i remove the input batching policy, the output batch size is 20 as expected.

This is by design. Connect never shrinks batches, it only merges them if, for example, you have small batches which you want to batch together into larger batches (they get concatenated basically) and there's usually no reason to configure batching both at the input and output level.

If you wish to shrink batches, then you can use a processor like group_by, group_by_value, split etc.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@pmak-852
Comment options

@mihaitodor
Comment options

Answer selected by pmak-852
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants