kafka: new deserializers#17202
Conversation
Signed-off-by: Adam Kotwasinski <adam.kotwasinski@gmail.com>
|
/assign-from @envoyproxy/first-pass-reviewers |
|
@envoyproxy/first-pass-reviewers assignee is @junr03 |
| bool ready_ = false; | ||
| }; | ||
|
|
||
| class VarInt32Deserializer : public Deserializer<int32_t> { |
There was a problem hiding this comment.
should we add class comments like the other classes?
| VarUInt32Deserializer varuint32_deserializer_; | ||
| }; | ||
|
|
||
| class VarInt64Deserializer : public Deserializer<int64_t> { |
There was a problem hiding this comment.
Do we eventually need a VarUInt64Deserializer that this deserializer can be written on top off like the above?
There was a problem hiding this comment.
No, fortunately not - its only int that has varint and unsigned_varint in kafka.
https://github.com/apache/kafka/blob/2.8.0/clients/src/main/java/org/apache/kafka/common/utils/ByteUtils.java
| EXPECT_THROW_WITH_REGEX(testee.feed(data), EnvoyException, "is too long"); | ||
| } | ||
|
|
||
| // Missing tests (chunks). |
There was a problem hiding this comment.
Yes - sorry about that! More tests have been added.
|
/wait |
Signed-off-by: Adam Kotwasinski <adam.kotwasinski@gmail.com>
Signed-off-by: Adam Kotwasinski <adam.kotwasinski@gmail.com>
|
Retrying Azure Pipelines: |
Signed-off-by: Adam Kotwasinski <adam.kotwasinski@gmail.com>
junr03
left a comment
There was a problem hiding this comment.
thanks for the changes will move up to @mattklein123 for final pass.
Signed-off-by: Adam Kotwasinski <adam.kotwasinski@gmail.com>
Commit Message: kafka: new deserializers
Additional Description: new deserializers for kafka variable-length encoded int32 & int64 (called varint, varlong there). These deserializers will be used in kafka-mesh-filter to decode internals of received kafka produce request objects so we can get the real messages out of the envelope (like here), and forward them to kafka producers.
Risk Level: Low
Testing: unit tests
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A