@danhermann ,hello,I used the example you supplyed in “https://www.elastic.co/guide/en/logstash/current/java-codec-plugin.html”,and success get the result by the java_stdin。However,when i set input from kafka,I got the error:
image
here is my config:
image
@zhi_asher, are you trying to use the Java codec you wrote with the Kafka input? If so, codecs are the one kind of plugin that are not interchangeable. In other words, Java codecs work only with Java inputs and outputs and Ruby codecs work only with Ruby inputs (such as the Kafka input) and outputs.
@danhermann, Our scenario is like this: kafka as the input source needs to decode some data in the input through a custom plug-in, If Java codes are not available, what should I do
@zhi_asher, since the Kafka input is a Ruby input, you would need to create a Ruby codec for it. There is a guide for doing that in the Logstash documentation. While we would like to make Java codecs available for use in both Ruby and Java plugins, the two work very differently when it comes to handling data so it would be a significant effort.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.