T - the type parameterTT - the type parameterpublic interface MessageType<T,TT>
| Modifier and Type | Method and Description |
|---|---|
MessageType |
buildConsumerMessage(org.apache.kafka.clients.consumer.ConsumerRecord<T,TT> record,
T key,
TT value)
Build message while consuming the message
for your specific needs Refer io.virtualan.cucumblan.message.typeimpl.JSONMessage
|
MessageType |
buildProducerMessage(Object tt)
Build message object build logic for the application specific need.
|
List<org.apache.kafka.common.header.Header> |
getHeaders()
Kafka message headers to be added to produce messages
|
Object |
getId()
Gets unique identifier of the message
|
T |
getKey()
Gets Kafka message key for kafka
|
TT |
getMessage()
Gets Kafka message to be used for Kafka
|
Object |
getMessageAsJson()
Mandatory JSON Should be defined and Used for Verification process.
|
String |
getType()
define a unique type of the message would be used.
|
String getType()
Object getId()
T getKey()
TT getMessage()
Object getMessageAsJson()
List<org.apache.kafka.common.header.Header> getHeaders()
MessageType buildProducerMessage(Object tt) throws MessageNotDefinedException
tt - the ttMessageNotDefinedExceptionMessageType buildConsumerMessage(org.apache.kafka.clients.consumer.ConsumerRecord<T,TT> record, T key, TT value) throws MessageNotDefinedException
record - ConsumerRecord object available in the contextkey - the kafka message keyvalue - the kafka message objectMessageNotDefinedException - the message not defined exceptionCopyright © 2021. All rights reserved.