How to give class name more than two class in protobuf

I am having two .proto with different class names
as person.proto
syntax = "proto3";

message Person {

int32 id = 1;
string name = 2;
string email = 3;
}

and second is message.proto

syntax = "proto3";

message SearchRequest {
int64 query = 1;
int64 page_number = 2;
string result_per_page = 3;
}

these two proto compiled and generate two _pd.rb files
as person_pd.rb and message_pd.rb

and message is encoded and written in one single file using two different proto .

And here is my logstash config

input
{
file
{
path => "/home/ramsey/protobuf/out.bin"
start_position => "beginning"
sincedb_path => "/dev/null"

codec => protobuf
{
      class_name => ["SearchRequest","Person"]
      include_path => [

                  "/home/ramsey/protobuf/message_pb.rb",
                  "/home/ramsey/protobuf/person_pb.rb"                            
                      ]
      protobuf_version => 3
}

}
}

If i run logstah it gives ERROR as

codec {
protobuf {
# This setting must be a string
# Expected string, got ["SearchRequest", "Person"]
class_name => ["SearchRequest", "Person"]
...
}
}

Can any body figure it out.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.