Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for message decoding via Schema registry #149

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

lasanthaS
Copy link
Contributor

Purpose

This PR adds support to decode a protobuf messages via a schema registry.

Resolves wso2/streaming-integrator#242

Sample app as follows.

@App:name("protobuf")

@source(
    type='kafka',
    group.id = 'siddhiconsumer',
    is.synchronous='true',
    threading.option='single.thread',
    topic.list='StringsOnlyOptionOne',
    bootstrap.servers='localhost:9092',
    is.binary.message='true',
    optional.configuration="key.deserializer:org.apache.kafka.common.serialization.StringDeserializer,value.deserializer:io.confluent.kafka.serializers.protobuf.KafkaProtobufDeserializer,specific.protobuf.key.type:com.google.protobuf.GeneratedMessageV3,derive.type:false,schema.registry.url:http://localhost:8081",
    @map(type='protobuf', schema='registry',
        @attributes(a='Snack.colour', b='Snack.name')))
define stream LowProductionAlertStreamProtoBuf (a string, b string);

from LowProductionAlertStreamProtoBuf#log("Hit for protobuf2")
select *
insert into LogStream;

Security checks

@lasanthaS lasanthaS changed the title Fix dependencies for protobuf schema reg. decoding Add support for message decoding via Schema registry Jan 24, 2022
@AnuGayan AnuGayan merged commit d5bd9bf into siddhi-io:master Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for the protobuf message in SI.
2 participants