Class KafkaProducer
java.lang.Object
callofproject.dev.service.notification.config.kafka.KafkaProducer
Kafka producer.
-
Constructor Summary
ConstructorsConstructorDescriptionKafkaProducer
(org.apache.kafka.clients.admin.NewTopic topic, org.springframework.kafka.core.KafkaTemplate<String, NotificationUserResponseDTO> kafkaTemplate) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Send a message to the Kafka topic.
-
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
Send a message to the Kafka topic.- Parameters:
message
- The message to send.
-