当往队列里添加的不是一个字符串 而是一个对象时 默认情况下amqp是会使用默认转化器把对象序列化成一个长字符串 非常的耗空间
    所以我们到要使用json转换器 把对象转换成json字符串

    先导入jackson依赖:消费的生产都要导入

    1. <dependency>
    2. <groupId>com.fasterxml.jackson.dataformat</groupId>
    3. <artifactId>jackson-dataformat-xml</artifactId>
    4. <version>2.9.10</version>
    5. </dependency>

    再添加json转化器对象 加入ioc容器

    @Bean
    public MessageConverter jsonMessageConverter(){
        return new Jackson2JsonMessageConverter();
    }