微调
This commit is contained in:
@@ -48,7 +48,7 @@ logging:
|
|||||||
|
|
||||||
#### 1、RocketMQ官方sdk中存在的问题:
|
#### 1、RocketMQ官方sdk中存在的问题:
|
||||||
|
|
||||||
##### 1.1、不支持LocalDate 和 LocalDateTim
|
##### 1.1、不支持LocalDate 和 LocalDateTime
|
||||||
|
|
||||||
原因:RocketMQ内置使用的转换器是**RocketMQMessageConverter**,转换Json时使用的是MappingJackson2MessageConverter,但是这个转换器不支持时间类型。
|
原因:RocketMQ内置使用的转换器是**RocketMQMessageConverter**,转换Json时使用的是MappingJackson2MessageConverter,但是这个转换器不支持时间类型。
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ public class RocketMQLogEnhance implements InitializingBean {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterPropertiesSet() throws Exception {
|
public void afterPropertiesSet() throws Exception {
|
||||||
System.out.println("配置rocket日志");
|
|
||||||
System.setProperty("rocketmq.client.logUseSlf4j", "true");
|
System.setProperty("rocketmq.client.logUseSlf4j", "true");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,6 @@ public abstract class EnhanceConsumerMessageHandler<T extends BaseMessage> {
|
|||||||
public void dispatchMessage(T message) {
|
public void dispatchMessage(T message) {
|
||||||
// 基础日志记录被父类处理了
|
// 基础日志记录被父类处理了
|
||||||
log.info("消费者收到消息[{}]", JSONObject.toJSON(message));
|
log.info("消费者收到消息[{}]", JSONObject.toJSON(message));
|
||||||
|
|
||||||
if (filter(message)) {
|
if (filter(message)) {
|
||||||
log.info("消息id{}不满足消费条件,已过滤。", message.getKey());
|
log.info("消息id{}不满足消费条件,已过滤。", message.getKey());
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user