}
private MessagePB.Bean createMessagePB(Message message, long messageKey) throws IOException {
DataByteArrayOutputStream mos = new DataByteArrayOutputStream();
mos.writeBoolean(TIGHT_ENCODING);
mos.writeVarInt(OPENWIRE_VERSION);
wireformat.marshal(message, mos);
MessagePB.Bean messageRecord = new MessagePB.Bean();
messageRecord.setCodec(codec_id);
messageRecord.setMessageKey(messageKey);