Interface MessageBatch
- All Known Implementing Classes:
JsonMessageBatch
public interface MessageBatch
-
Method Summary
Modifier and TypeMethodDescriptionvoidappend(byte[] data, pl.allegro.tech.hermes.tracker.consumers.MessageMetadata batchMessageMetadata) booleancanFit(byte[] data) close()List<pl.allegro.tech.hermes.api.Header> intpl.allegro.tech.hermes.api.ContentTypegetId()longintList<pl.allegro.tech.hermes.tracker.consumers.MessageMetadata> intintgetSize()pl.allegro.tech.hermes.api.SubscriptionNamegetTopic()booleanvoidbooleanisBiggerThanTotalCapacity(byte[] data) booleanisClosed()booleanisEmpty()booleanbooleanisFull()default boolean
-
Method Details
-
isReadyForDelivery
default boolean isReadyForDelivery() -
append
void append(byte[] data, pl.allegro.tech.hermes.tracker.consumers.MessageMetadata batchMessageMetadata) throws BufferOverflowException - Throws:
BufferOverflowException
-
canFit
boolean canFit(byte[] data) -
isExpired
boolean isExpired() -
isClosed
boolean isClosed() -
isFull
boolean isFull() -
getId
String getId() -
getContentType
pl.allegro.tech.hermes.api.ContentType getContentType() -
getContent
ByteBuffer getContent() -
getPartitionOffsets
List<SubscriptionPartitionOffset> getPartitionOffsets() -
getMessagesMetadata
List<pl.allegro.tech.hermes.tracker.consumers.MessageMetadata> getMessagesMetadata() -
getAdditionalHeaders
List<pl.allegro.tech.hermes.api.Header> getAdditionalHeaders() -
getLifetime
long getLifetime() -
getMessageCount
int getMessageCount() -
close
MessageBatch close() -
isEmpty
boolean isEmpty() -
isBiggerThanTotalCapacity
boolean isBiggerThanTotalCapacity(byte[] data) -
getCapacity
int getCapacity() -
getSize
int getSize() -
incrementRetryCounter
void incrementRetryCounter() -
getRetryCounter
int getRetryCounter() -
hasSubscriptionIdentityHeaders
boolean hasSubscriptionIdentityHeaders() -
getTopic
String getTopic() -
getSubscription
pl.allegro.tech.hermes.api.SubscriptionName getSubscription()
-