You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was not able to get the codec to work based on a Kafka input, and I created a minimum example using the file input plugin in the original description.
I did then discover the value_deserializer_class => "org.apache.kafka.common.serialization.ByteArrayDeserializer" option for the Kafka plugin, which I think is probably a reasonable thing to require, however it was unclear to me that this was required.
Indeed the documentation for this plugin makes no mention of this special requirement for input plugins. I think that should probably be added to the main description and the description for the binary encoding option.
Plugins which do not have an option similar to the one for the Kafka plugin would then be completely unsupported and that should probably also be mentioned.
Old description
Logstash information:
Logstash version 8.12.1, running the official docker image via docker cli.
Description of the problem including expected versus actual behavior:
Deserialization of avro records does not work using the binary (plain) encoding.
It looks like this was well-known back when it was decided that Logstash should only work with base64 encoded data, however we had an expectation from the documentation and the recent addition of the binary encoding that it would also work with plain data.
If the problem is unfixable, then at the very least the documentation should be updated to say in quite large letters that for decoding, still only base64 is supported.
Steps to reproduce:
Create example schema (referred to as example-schema.avsc below):
Using this setup I actually also can't get b64-encoded data to work right. We do have some base64-encoded data working when running from kafka though, but I initially ran into this issue when attempting to move away from base64-encoding (ie also over kafka).
jonaslb
changed the title
Deserialization does not work with binary encoding
Document that deserialization with binary encoding requires input does not do string decoding by itself (e.g. Kafka input plugin)
Feb 21, 2024
New description
I was not able to get the codec to work based on a Kafka input, and I created a minimum example using the file input plugin in the original description.
I did then discover the
value_deserializer_class => "org.apache.kafka.common.serialization.ByteArrayDeserializer"
option for the Kafka plugin, which I think is probably a reasonable thing to require, however it was unclear to me that this was required.Indeed the documentation for this plugin makes no mention of this special requirement for input plugins. I think that should probably be added to the main description and the description for the binary encoding option.
Plugins which do not have an option similar to the one for the Kafka plugin would then be completely unsupported and that should probably also be mentioned.
Old description
Logstash information:
Logstash version 8.12.1, running the official docker image via docker cli.
Description of the problem including expected versus actual behavior:
Deserialization of avro records does not work using the binary (plain) encoding.
It looks like this was well-known back when it was decided that Logstash should only work with base64 encoded data, however we had an expectation from the documentation and the recent addition of the binary encoding that it would also work with plain data.
If the problem is unfixable, then at the very least the documentation should be updated to say in quite large letters that for decoding, still only base64 is supported.
Steps to reproduce:
example-schema.avsc
below):logstash.conf
example pipeline:#!/usr/bin/bash -eu docker run --rm -it \ -v ./example_record.avro:/usr/share/logstash/example_record.avro:ro \ -v ./example-schema.avsc:/usr/share/logstash/example-schema.avsc:ro \ -v ./logstash.conf:/usr/share/logstash/pipeline/logstash.conf:ro \ logstash:8.12.1 -f /usr/share/logstash/pipeline/logstash.conf
Provide logs (if relevant):
The following error is output:
The text was updated successfully, but these errors were encountered: