import "code.google.com/p/goprotobuf/proto" 
import "github.com/mozilla-services/heka/message" 
b := // []byte value from your code 
msg := new(message.Message) 
err := proto.Unmarshal(b, msg) 

Trink 

----- Original Message -----

> From: "David Birdsong" <[email protected]>
> To: "heka" <[email protected]>
> Sent: Friday, January 31, 2014 7:07:19 PM
> Subject: [heka] initializing msg from a Message.proto dumped string

> What's the easiest way to initialize a message that's been previously
> serialized? I'm writing an input module from kafka that takes care of
> message framing. So I've got a []byte value that could be directly
> instantiated into a message object. I'm looking at other input modules for
> an example, but so many of them deal with some sort of fd and parsing the
> input stream to fully build up a message object.

> _______________________________________________
> Heka mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/heka
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka

Reply via email to