Class TicketKafkaProducer

java.lang.Object
callofproject.dev.service.ticket.config.kafka.TicketKafkaProducer

@Service("callofproject.dev.service.ticket.config.kafka.TicketKafkaProducer") public class TicketKafkaProducer extends Object
Author:
Nuri Can ÖZTÜRK The ticket kafka producer. CopyRight(C) 2023 by Call Of Project Teams.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TicketKafkaProducer(org.apache.kafka.clients.admin.NewTopic topic, org.apache.kafka.clients.admin.NewTopic emailTopic, org.springframework.kafka.core.KafkaTemplate<String,NotificationKafkaDTO> notificationKafkaTemplate, org.springframework.kafka.core.KafkaTemplate<String,callofproject.dev.data.common.dto.EmailTopic> emailKafkaTemplate)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    sendEmail(callofproject.dev.data.common.dto.EmailTopic emailTopic)
    Send email.
    void
    Send notification.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TicketKafkaProducer

      public TicketKafkaProducer(@Qualifier("notificationTopic") org.apache.kafka.clients.admin.NewTopic topic, @Qualifier("emailTopic") org.apache.kafka.clients.admin.NewTopic emailTopic, org.springframework.kafka.core.KafkaTemplate<String,NotificationKafkaDTO> notificationKafkaTemplate, org.springframework.kafka.core.KafkaTemplate<String,callofproject.dev.data.common.dto.EmailTopic> emailKafkaTemplate)
      Constructor.
      Parameters:
      topic - represents the topic
      emailTopic - represents the email topic
      notificationKafkaTemplate - represents the notification kafka template
      emailKafkaTemplate - represents the email kafka template
  • Method Details

    • sendNotification

      public void sendNotification(NotificationKafkaDTO notificationDTO)
      Send notification.
      Parameters:
      notificationDTO - represents the notification dto
    • sendEmail

      public void sendEmail(callofproject.dev.data.common.dto.EmailTopic emailTopic)
      Send email.
      Parameters:
      emailTopic - represents the email topic