Class RawBatchConverter

java.lang.Object
org.apache.pulsar.client.impl.RawBatchConverter

public class RawBatchConverter extends Object
  • Constructor Details

    • RawBatchConverter

      public RawBatchConverter()
  • Method Details

    • isReadableBatch

      public static boolean isReadableBatch(RawMessage msg)
    • extractIdsAndKeysAndSize

      public static List<org.apache.commons.lang3.tuple.ImmutableTriple<org.apache.pulsar.client.api.MessageId,String,Integer>> extractIdsAndKeysAndSize(RawMessage msg) throws IOException
      Throws:
      IOException
    • rebatchMessage

      public static Optional<RawMessage> rebatchMessage(RawMessage msg, BiPredicate<String,org.apache.pulsar.client.api.MessageId> filter) throws IOException
      Take 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