# Logstash protobuf codec int issue

**URL:** <https://discuss.elastic.co/t/logstash-protobuf-codec-int-issue/86823>\
**Category:** Logstash\
**Created:** [May 23, 2017, 2:12pm UTC](https://discuss.elastic.co/t/logstash-protobuf-codec-int-issue/86823 "2017-05-23T14:12:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roi\_Klein](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@Roi\_Klein](https://discuss.elastic.co/u/Roi_Klein)\
**Post date:** [May 23, 2017, 2:12pm UTC](https://discuss.elastic.co/t/logstash-protobuf-codec-int-issue/86823/1 "2017-05-23T14:12:05Z")

</div>

Hey all,

using this proto:  
`message foo {  
optional int64 f = 1;  
}

message boo {  
optional int64 b = 1;  
}

message aa {  
oneof bull {  
foo fa = 1;  
boo ba = 2;  
}  
required int64 b = 3;  
}`

and logstash config:  
`input { kafka { bootstrap_servers => ":9092" topics => ["logstash"] auto_offset_reset => "earliest" codec => protobuf { class_name => "Aa" include_path => ['/home/user/aa.pb.rb'] } } } output { stdout { codec => json } }`

I set aa.b to 128  
I recieved this output:  
`{"b":3104751,"@timestamp":"2017-05-23T13:53:09.756Z","@version":"1","ba":{"b":23}}`

If i set it to 127 it works, meaning I have an issue with the definition of int64, looks like it defines it like int8

libprotoc 2.6.1  
ruby-protoc 1.6.1

Do I need to compile the proto different?

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 20, 2017, 2:12pm UTC](https://discuss.elastic.co/t/logstash-protobuf-codec-int-issue/86823/2 "2017-06-20T14:12:15Z")

</div>

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