Class KafkaJsonMessageSender<T>

  • All Implemented Interfaces:
    Consumer<T>, org.apache.sling.distribution.journal.MessageSender<T>

    public class KafkaJsonMessageSender<T>
    extends Object
    implements org.apache.sling.distribution.journal.MessageSender<T>
    • Constructor Detail

      • KafkaJsonMessageSender

        public KafkaJsonMessageSender​(org.apache.kafka.clients.producer.KafkaProducer<String,​String> producer,
                                      String topic,
                                      org.apache.sling.distribution.journal.ExceptionEventSender eventSender)
    • Method Detail

      • send

        public void send​(T payload)
                  throws org.apache.sling.distribution.journal.MessagingException
        Specified by:
        send in interface org.apache.sling.distribution.journal.MessageSender<T>
        Throws:
        org.apache.sling.distribution.journal.MessagingException
      • send

        public void send​(T payload,
                         Map<String,​String> properties)
                  throws org.apache.sling.distribution.journal.MessagingException
        Specified by:
        send in interface org.apache.sling.distribution.journal.MessageSender<T>
        Throws:
        org.apache.sling.distribution.journal.MessagingException