-
Notifications
You must be signed in to change notification settings - Fork 244
Open
Labels
Description
Version: 4.1.2
configure:
spring:
cloud:
bus:
enabled: true
id: MSGSMS:OMP:AMService:${VM_IP:${random.uuid}}
trace:
enabled: true
ack:
enabled: true
HttpExchangeRepository:
@Component
public class LogEventTraceRepository implements HttpExchangeRepository {
private static final Logger log = LoggerFactory.getLogger(LogEventTraceRepository.class);
private List<HttpExchange> traces = new ArrayList<>();
@Override
public List<HttpExchange> findAll() {
return new ArrayList<>(traces);
}
@Override
public void add(HttpExchange httpExchange) {
traces.add(httpExchange);
log.info("traces is {}", httpExchange);
}
}
but when i define a AckRemoteApplicationEvent listener,it works well:
@Component
public class AckListener {
@EventListener
public void onApplicationEvent(AckRemoteApplicationEvent event) {
System.out.println("get ack event " + event.getOriginService());
}
}
how can i make trace listener works well