Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add MultiMessageCodec interface #1307
It makes it possible to decode a list of Message objects from a RawMessage instead of just a single one. This is useful for protocols like NetFlow or collectd where one packet contains multiple messages.
The new interface is needed to keep the Codec interface compatible. A breaking change is only possible with the next major version.
Adjust DecodingProcessor and ProcessBufferProcessor to handle a list of Message objects.
I created another branch with a different implementation here:
The v1 branch tries to minimize the message list usage, this one (v2) converts the single message to a list as soon as possible to avoid special cases all over the place.
I benchmarked both branches agains master and it looks like there isn't much difference. All branches have been benchmarked twice.
I prefer this diff. Any opinions?
I initially cringed about the
The need for the feature/change is definitely given. I was stumbling upon this with other inputs already, too. Thanks!