update - 调整完成待办事件的内容,同时调整 RocketMQ 默认的事件处理器
This commit is contained in:
parent
596efa36b0
commit
f000f3767a
@ -1,6 +1,10 @@
|
||||
package cn.axzo.workflow.core.conf;
|
||||
|
||||
import cn.axzo.framework.rocketmq.*;
|
||||
import cn.axzo.framework.rocketmq.DefaultEventConsumer;
|
||||
import cn.axzo.framework.rocketmq.EventConsumer;
|
||||
import cn.axzo.framework.rocketmq.EventHandlerRepository;
|
||||
import cn.axzo.framework.rocketmq.EventProducer;
|
||||
import cn.axzo.framework.rocketmq.RocketMQEventProducer;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
@ -9,6 +13,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
@ -76,7 +81,11 @@ public class RocketMqEventConfiguration {
|
||||
// }
|
||||
@Bean
|
||||
EventHandlerRepository eventHandlerRepository() {
|
||||
return new EventHandlerRepository((ex, logText) ->
|
||||
log.warn("MQ, handle warning {} , Exception: {}", logText, JSON.toJSONString(ex)));
|
||||
return new EventHandlerRepository((ex, logText) -> {
|
||||
log.warn("MQ, handle warning {} , Exception: {}", logText, JSON.toJSONString(ex));
|
||||
if (Objects.nonNull(ex)) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ public class RocketMqMessagePushEventListener implements BpmnMessagePushEventLis
|
||||
event.getNoticeConfig().getPending().getPendingMessageId(), JSON.toJSONString(event.getAssigner()));
|
||||
}
|
||||
MessagePushDTO dto = build(event.getNoticeConfig().getPending().getPendingMessageId(), PROCESS_PUSH_PENDING_COMPLETE,
|
||||
event, null);
|
||||
event, collectionVariable(event));
|
||||
sendMessageQueue(dto, PROCESS_PUSH_PENDING_COMPLETE);
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("RocketMqMessagePushEventListener#onPendingComplete...end, msgTemplateId: {}, receivePerson: " +
|
||||
|
||||
Loading…
Reference in New Issue
Block a user