Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Camel JMS Spring Remoting and Google Protocol Buffers

$
0
0
Dear Community,

i am successfully using Camel with Spring remoting over JMS using the
default Java serialization. The interface used: String decode(byte[]image,
String BarcodeType, String charset).
Now i have to add access for a CPP using CMS client and the best cross
language structure serializer that comes to mind is Google's Protocol
Buffers.
Nothing to it i thought, interface used: byte[] decode (byte[]pb_structure),
but this is a no go.
The images received are corrupted after deserialization, and sometimes a
array out of bounds exception is thrown. Locally serializing and
deserializing the Protocol Buffer structure works like a charm, also in
Java, so something on the way to the Consumer mangles the byte array. The
fact that the byte array in the first interface does not get mangled has me
puzzled.
Maybe Camel/Spring not send the JMS message as bytes but as String, getting
in conflict with the encoding?

Viewing all articles
Browse latest Browse all 5648

Trending Articles