[
https://issues.apache.org/jira/browse/DIRMINA-654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439462#comment-13439462
]
Marcin Kolda commented on DIRMINA-654:
--------------------------------------
Tomasz,
1. Do you have any new version of this code? Your tests seems to fail with MINA
2.0.2 and protobuf in version 2.4.1.
2. Do you support decoding multiple message types?
3. You're encoding message size with
com.google.protobuf.CodedOutputStream.computeRawVarint32Size() which can take
from 1 to 5 bytes. In case when message size is greater than 1 byte and when
decoder has only 1 byte in buffer I'm getting exception in SizeContext.get()
during size computation on decoder:
java.lang.ArrayIndexOutOfBoundsException: 1
at
com.google.protobuf.CodedInputStream.readRawByte(CodedInputStream.java:736)
at
com.google.protobuf.CodedInputStream.readRawVarint32(CodedInputStream.java:343)
I think you need fixed header with message length in such case.
> Google Protocol Buffers Codec
> -----------------------------
>
> Key: DIRMINA-654
> URL: https://issues.apache.org/jira/browse/DIRMINA-654
> Project: MINA
> Issue Type: New Feature
> Components: Filter
> Reporter: Tomasz Blachowicz
> Fix For: 2.0.6
>
> Attachments: protobuf.txt
>
>
> Google Protocol Buffers (protobuf) are language-neutral, platform-neutral,
> extensible mechanism for serializing structured data. Apache MINA already
> provides several protocol codecs (decoders and encodes) that allows to deal
> with different wire formats. The Protocol Buffer is the perfect candidate for
> new codec available as separate and optional module within Apache MINA.
> More details on Protocol Buffers can be found on the website:
> http://code.google.com/apis/protocolbuffers
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira