使用Kryo替换spring amqp的Java序列化
spring amqp的原生并没有对Kryo加以支持,Kryo的优点就不多说了。 git地址:https://github.com/addozhang/spring-kryo-messaeg-converter public class KryoMessageConverter extends AbstractMessageConverter { public static final String CONTENT_TYPE = "application/x-kryo"; public static final String DEFAULT_CHARSET = "UTF-8"; private String defaultCharset = DEFAULT_CHARSET; private KryoFactory kryoFactory = new DefaultKryoFactory(); /** * Crate a message from the payload object and message properties provided.