P - message typepublic final class ProducerRecord<P>
extends java.lang.Object
DatabusProducer
sends to DatabusConsumer| Constructor and Description |
|---|
ProducerRecord(RoutingData routingData,
Headers headers,
MessagePayload<P> payload)
Parameters cannot be null.
|
| Modifier and Type | Method and Description |
|---|---|
Headers |
getHeaders()
A Map with additional information.
|
RoutingData |
getRoutingData()
The address where the record must to be sent.
|
MessagePayload<P> |
payload()
The message which will be sent
|
public ProducerRecord(RoutingData routingData, Headers headers, MessagePayload<P> payload)
routingData - the address where the record must to be sent.
If it's null, throws DatabusClientRuntimeException exceptionheaders - key-value map with additional information. Some fields are well-know. See
HeadersFieldpayload - message itselfpublic RoutingData getRoutingData()
public Headers getHeaders()
HeadersFieldpublic MessagePayload<P> payload()