@@ -0,0 +1,817 @@
+package com.ctrip.hermes.core.codec;%0A%0Aimport java.util.Map;%0A%0Aimport com.google.common.base.Charsets;%0A%0Apublic class CMessagingCodec implements Codec %7B%0A%0A%09@Override%0A%09public byte%5B%5D encode(String topic, Object obj) %7B%0A%09%09if (obj instanceof String) %7B%0A%09%09%09return ((String) obj).getBytes(Charsets.UTF_8);%0A%09%09%7D else %7B%0A%09%09%09throw new IllegalArgumentException(%22CMessaging producer messages should be String type, illegal message type %22%0A%09%09%09      + obj.getClass());%0A%09%09%7D%0A%09%7D%0A%0A%09@SuppressWarnings(%22unchecked%22)%0A%09@Override%0A%09public %3CT%3E T decode(byte%5B%5D raw, Class%3CT%3E clazz) %7B%0A%09%09if (clazz == byte%5B%5D.class) %7B%0A%09%09%09return (T) raw;%0A%09%09%7D else %7B%0A%09%09%09throw new IllegalArgumentException(%22CMessaging consumer messages should be byte%5B%5D type, illegal message type %22%0A%09%09%09      + clazz);%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09public void configure(Map%3CString, ?%3E configs) %7B%0A%09%7D%0A%0A%7D%0A

add CMessaging codec