Örnek
Şöyle yaparız.
import org.springframework.kafka.annotation.DltHandler;@Slf4j@RequiredArgsConstructor@Componentpublic class UpdateItemConsumer {...@DltHandlerpublic void dlt(String data, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic) {log.error("Event from topic "+topic+" is dead lettered - event:" + data);}}
Örnek
Şöyle yaparız.
@DltHandler public void processMessage(OrderEvent message) { log.error("DltHandler processMessage = {}", message); }
Hiç yorum yok:
Yorum Gönder