Class JsonMessageBatch
java.lang.Object
pl.allegro.tech.hermes.consumers.consumer.batch.JsonMessageBatch
- All Implemented Interfaces:
MessageBatch
-
Method Summary
Modifier and TypeMethodDescriptionvoidappend(byte[] data, pl.allegro.tech.hermes.tracker.consumers.MessageMetadata metadata) 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()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface pl.allegro.tech.hermes.consumers.consumer.batch.MessageBatch
isReadyForDelivery
-
Method Details
-
isFull
public boolean isFull()- Specified by:
isFullin interfaceMessageBatch
-
append
public void append(byte[] data, pl.allegro.tech.hermes.tracker.consumers.MessageMetadata metadata) - Specified by:
appendin interfaceMessageBatch
-
canFit
public boolean canFit(byte[] data) - Specified by:
canFitin interfaceMessageBatch
-
isExpired
public boolean isExpired()- Specified by:
isExpiredin interfaceMessageBatch
-
getId
- Specified by:
getIdin interfaceMessageBatch
-
getContentType
public pl.allegro.tech.hermes.api.ContentType getContentType()- Specified by:
getContentTypein interfaceMessageBatch
-
close
- Specified by:
closein interfaceMessageBatch
-
getContent
- Specified by:
getContentin interfaceMessageBatch
-
getPartitionOffsets
- Specified by:
getPartitionOffsetsin interfaceMessageBatch
-
getMessagesMetadata
- Specified by:
getMessagesMetadatain interfaceMessageBatch
-
getAdditionalHeaders
- Specified by:
getAdditionalHeadersin interfaceMessageBatch
-
getMessageCount
public int getMessageCount()- Specified by:
getMessageCountin interfaceMessageBatch
-
getLifetime
public long getLifetime()- Specified by:
getLifetimein interfaceMessageBatch
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceMessageBatch
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceMessageBatch
-
isBiggerThanTotalCapacity
public boolean isBiggerThanTotalCapacity(byte[] data) - Specified by:
isBiggerThanTotalCapacityin interfaceMessageBatch
-
getCapacity
public int getCapacity()- Specified by:
getCapacityin interfaceMessageBatch
-
getSize
public int getSize()- Specified by:
getSizein interfaceMessageBatch
-
incrementRetryCounter
public void incrementRetryCounter()- Specified by:
incrementRetryCounterin interfaceMessageBatch
-
getRetryCounter
public int getRetryCounter()- Specified by:
getRetryCounterin interfaceMessageBatch
-
hasSubscriptionIdentityHeaders
public boolean hasSubscriptionIdentityHeaders()- Specified by:
hasSubscriptionIdentityHeadersin interfaceMessageBatch
-
getTopic
- Specified by:
getTopicin interfaceMessageBatch
-
getSubscription
public pl.allegro.tech.hermes.api.SubscriptionName getSubscription()- Specified by:
getSubscriptionin interfaceMessageBatch
-