You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Gershaw, Geoffrey" <ge...@credit-suisse.com> on 2013/06/11 19:09:54 UTC

Google Protobuf DataFormat

Hello all,

 

I receive a JMS BytesMessage that contains the byte array of a Protobuf.
I am then using the unmarshal tag to deserialize the protobuf. The route
is below. I get an InvalidPayloadException. Seen below

 

 

1 caught: org.apache.camel.InvalidPayloadException: No body available of
type:
com.cs.corex.entities.md.ProtoBufMarketDataProto.ProtoBufMarketData but
has value: [B@32a3270f of type: byte[] on: JmsMessage[JmsMessageID:
ID:COLT_UAT_1.2A051A5D55CB557B6A:482]. Exchange[JmsMessage[JmsMessageID:
ID:COLT_UAT_1.2A051A5D55CB557B6A:482]]

 

 

 

              <route>

                     <from uri="jms:topic:{{corex.ems.topic}}?" />

                           <to uri="log:Received Corex
Data?level=DEBUG"/>

                           <unmarshal>

                           <protobuf
instanceClass="com.cs.corex.entities.md.ProtoBufMarketDataProto$ProtoBuf
MarketData" />

                         </unmarshal>

                           <to uri="log:Received/Unmarshalled Corex
Data?level=INFO"/>

              </route>

 

The protobuf I am reading was created in C#. So we couldn't use the
ObjectMessage. Any ideas?

 

Thanks

Geoffrey A Gershaw

CREDIT SUISSE

Information Technology | Credit eTrading Development, KFVB 525

7033 Louis Stephens Drive | 27560 Research Triangle Park | United States

Phone +1 919 994 6412

geoffrey.gershaw@credit-suisse.com | www.credit-suisse.com
<http://www.credit-suisse.com/> 

 


=============================================================================== 
Please access the attached hyperlink for an important electronic communications disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
===============================================================================