From cf61493430ed21280589caf46b25f7d9f46088e7 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 29 Dec 2024 11:19:20 +0100 Subject: [PATCH] Deleting the old delivery event consumer --- .../controller/OrderController.java | 1 - .../kafka/DeliveryStatusMessageConsumer.java | 20 ------------------- 2 files changed, 21 deletions(-) delete mode 100644 order/src/main/java/com/microservices/order_service/kafka/DeliveryStatusMessageConsumer.java diff --git a/order/src/main/java/com/microservices/order_service/controller/OrderController.java b/order/src/main/java/com/microservices/order_service/controller/OrderController.java index b3988c81..b9b31b34 100644 --- a/order/src/main/java/com/microservices/order_service/controller/OrderController.java +++ b/order/src/main/java/com/microservices/order_service/controller/OrderController.java @@ -199,7 +199,6 @@ public ResponseEntity> GetAddresses(){ public ResponseEntity sendToDelivery(@RequestBody OrderPaidEvent orderPaidEvent){ orderPaidEventProducer.publishOrderPaidEvent(orderPaidEvent); return ResponseEntity.ok("Order paid successfully"); - } } \ No newline at end of file diff --git a/order/src/main/java/com/microservices/order_service/kafka/DeliveryStatusMessageConsumer.java b/order/src/main/java/com/microservices/order_service/kafka/DeliveryStatusMessageConsumer.java deleted file mode 100644 index 20120b9f..00000000 --- a/order/src/main/java/com/microservices/order_service/kafka/DeliveryStatusMessageConsumer.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.microservices.order_service.kafka; - -import com.microservices.order_service.dto.DeliveryStatusMessage; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.kafka.annotation.KafkaListener; - -public class DeliveryStatusMessageConsumer { - private static final Logger logger = LoggerFactory.getLogger(DeliveryStatusMessageConsumer.class); - - @KafkaListener(topics = "${spring.kafka.topic.delivery-status}", groupId = "deliveryReceiver", containerFactory = "DeliveryListenerContainerFactory") - public void listen(DeliveryStatusMessage deliveryStatusMessage) { - logger.info("WELYEEEEEY !!!"); - - logger.info("Received record: " + deliveryStatusMessage.getOrderId()); - logger.info("Delivery status: " + deliveryStatusMessage.getStatus()); - } - - -}