public PartialDecodedMessage DecodePartial(IoBuffer buf) { HermesPrimitiveCodec codec = new HermesPrimitiveCodec(buf); // skip whole length codec.ReadInt(); // skip header length int headerLen = codec.ReadInt(); // skip body length int bodyLen = codec.ReadInt(); verifyChecksum(buf, headerLen + bodyLen); PartialDecodedMessage msg = new PartialDecodedMessage(); msg.Key = codec.ReadString(); msg.BornTime = codec.ReadLong(); msg.RemainingRetries = codec.ReadInt(); msg.BodyCodecType = codec.ReadString(); int len = codec.ReadInt(); msg.DurableProperties = buf.GetSlice(len); len = codec.ReadInt(); msg.VolatileProperties = buf.GetSlice(len); msg.Body = buf.GetSlice(bodyLen); // skip crc codec.ReadLong(); return msg; }
public void Encode (PartialDecodedMessage msg, IoBuffer buf) { throw new NotImplementedException (); }