I am currently trying to send protobuf encoded messages to topics.
With the following topic configuration:
SingleValueTopicDetails.Builder builder = theTopicControl.newDetailsBuilder(SingleValueTopicDetails.Builder.class); final TopicDetails details = builder.metadata(Diffusion.metadata().string("row0")).build();
It works and I can send an protobuf encoded message to the topic. But in this case its "just" a normal SingleValue topic.
If I try to configure the topic as follows:
ProtocolBufferTopicDetails.Builder builder = theTopicControl.newDetailsBuilder(ProtocolBufferTopicDetails.Builder.class); final TopicDetails details = builder.updateMode(ProtocolBufferTopicDetails.Attributes.UpdateMode.FULL).messageDetails("Person.proto", "Person").build();
I get the error "INVALID_DETAILS" while adding the topic. I understand that the file with the message definitions (in my case Person.proto) must be available on the server, but where? I put it into $Diffusion/data.
Or am I completely misconfiguring the Topic for usage with protobuf, if so please provide me some information how to do it correctley.
Hope you can give me some more information regarding this topic.
Please sign in to leave a comment.