Package org.apache.sling.distribution.journal.kafka

## Class KafkaJsonMessageSender<T>

- java.lang.Object
- - org.apache.sling.distribution.journal.kafka.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 Summary

Constructors
`KafkaJsonMessageSender​(org.apache.kafka.clients.producer.KafkaProducer<String,​String> producer, String topic, org.apache.sling.distribution.journal.ExceptionEventSender eventSender)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `send​(T payload)`
`void` `send​(T payload, Map<String,​String> properties)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.Consumer

`andThen`

### Methods inherited from interface org.apache.sling.distribution.journal.MessageSender

`accept`

### 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`