Package org.apache.pulsar.client.impl
Class RawBatchConverter
java.lang.Object
org.apache.pulsar.client.impl.RawBatchConverter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<org.apache.commons.lang3.tuple.ImmutableTriple<org.apache.pulsar.client.api.MessageId,String, Integer>> static booleanstatic Optional<RawMessage>rebatchMessage(RawMessage msg, BiPredicate<String, org.apache.pulsar.client.api.MessageId> filter) Take a batched message and a filter, and returns a message with the only the sub-messages which match the filter.
-
Constructor Details
-
RawBatchConverter
public RawBatchConverter()
-
-
Method Details
-
isReadableBatch
-
extractIdsAndKeysAndSize
public static List<org.apache.commons.lang3.tuple.ImmutableTriple<org.apache.pulsar.client.api.MessageId,String, extractIdsAndKeysAndSizeInteger>> (RawMessage msg) throws IOException - Throws:
IOException
-
rebatchMessage
public static Optional<RawMessage> rebatchMessage(RawMessage msg, BiPredicate<String, org.apache.pulsar.client.api.MessageId> filter) throws IOExceptionTake a batched message and a filter, and returns a message with the only the sub-messages which match the filter. Returns an empty optional if no messages match. NOTE: this message does not alter the reference count of the RawMessage argument.- Throws:
IOException
-