java.lang.Object
callofproject.dev.service.notification.config.kafka.KafkaProducer

@Service public class KafkaProducer extends Object
Kafka producer.
  • Constructor Details

    • KafkaProducer

      public KafkaProducer(org.apache.kafka.clients.admin.NewTopic topic, org.springframework.kafka.core.KafkaTemplate<String,NotificationUserResponseDTO> kafkaTemplate)
      Constructor.
      Parameters:
      topic - The topic.
      kafkaTemplate - The kafka template.
  • Method Details

    • sendMessageToUser

      public void sendMessageToUser(NotificationUserResponseDTO message)
      Send a message to the Kafka topic.
      Parameters:
      message - The message to send.