| Constructor and Description |
|---|
MessageImpl(String topic,
String msgId,
Map<String,String> properties,
byte[] payload,
Schema<T> schema,
MessageMetadata msgMetadata) |
MessageImpl(String topic,
String msgId,
Map<String,String> properties,
io.netty.buffer.ByteBuf payload,
Schema<T> schema,
MessageMetadata msgMetadata) |
protected MessageId messageId
public MessageImpl(String topic, String msgId, Map<String,String> properties, byte[] payload, Schema<T> schema, MessageMetadata msgMetadata)
public static <T> MessageImpl<T> create(MessageMetadata msgMetadata, ByteBuffer payload, Schema<T> schema, String topic)
public static <T> MessageImpl<T> create(String topic, MessageIdImpl messageId, MessageMetadata msgMetadata, io.netty.buffer.ByteBuf payload, Optional<EncryptionContext> encryptionCtx, ClientCnx cnx, Schema<T> schema, int redeliveryCount, boolean pooledMessage, long consumerEpoch)
public static <T> MessageImpl<T> create(String topic, BatchMessageIdImpl batchMessageIdImpl, MessageMetadata batchMetadata, SingleMessageMetadata singleMessageMetadata, io.netty.buffer.ByteBuf payload, Optional<EncryptionContext> encryptionCtx, ClientCnx cnx, Schema<T> schema, int redeliveryCount, boolean pooledMessage, long consumerEpoch)
public static MessageImpl<byte[]> deserialize(io.netty.buffer.ByteBuf headersAndPayload) throws IOException
IOExceptionpublic static boolean isEntryExpired(int messageTTLInSeconds,
long entryTimestamp)
public static boolean isEntryPublishedEarlierThan(long entryTimestamp,
long timestamp)
public static MessageImpl<byte[]> deserializeSkipBrokerEntryMetaData(io.netty.buffer.ByteBuf headersAndPayloadWithBrokerEntryMetadata) throws IOException
IOExceptionpublic void setReplicatedFrom(String cluster)
public boolean isReplicated()
isReplicated in interface Message<T>public String getReplicatedFrom()
getReplicatedFrom in interface Message<T>public long getPublishTime()
getPublishTime in interface Message<T>public long getEventTime()
getEventTime in interface Message<T>public long getDeliverAtTime()
public boolean isExpired(int messageTTLInSeconds)
public Optional<Schema<?>> getReaderSchema()
getReaderSchema in interface Message<T>public byte[] getSchemaVersion()
getSchemaVersion in interface Message<T>public SchemaInfo getSchemaInfo()
public void setSchemaInfoForReplicator(SchemaInfo schemaInfo)
public SchemaInfo getSchemaInfoForReplicator()
public long getSequenceId()
getSequenceId in interface Message<T>public String getProducerName()
getProducerName in interface Message<T>public io.netty.buffer.ByteBuf getDataBuffer()
public MessageId getMessageId()
getMessageId in interface Message<T>public Map<String,String> getProperties()
getProperties in interface Message<T>public boolean hasProperty(String name)
hasProperty in interface Message<T>public String getProperty(String name)
getProperty in interface Message<T>public MessageMetadata getMessageBuilder()
public String getTopicName()
getTopicName in interface Message<T>public boolean hasBase64EncodedKey()
hasBase64EncodedKey in interface Message<T>public byte[] getKeyBytes()
getKeyBytes in interface Message<T>public boolean hasOrderingKey()
hasOrderingKey in interface Message<T>public byte[] getOrderingKey()
getOrderingKey in interface Message<T>public BrokerEntryMetadata getBrokerEntryMetadata()
public void setBrokerEntryMetadata(BrokerEntryMetadata brokerEntryMetadata)
public ClientCnx getCnx()
public void recycle()
public boolean hasBrokerPublishTime()
hasBrokerPublishTime in interface Message<T>public Optional<Long> getBrokerPublishTime()
getBrokerPublishTime in interface Message<T>public boolean hasReplicateTo()
public boolean hasReplicateFrom()
public Optional<EncryptionContext> getEncryptionCtx()
getEncryptionCtx in interface Message<T>public int getRedeliveryCount()
getRedeliveryCount in interface Message<T>Copyright © 2017–2022 Apache Software Foundation. All rights reserved.