Interface BatchMessageContainer


  • @Public
    @Stable
    public interface BatchMessageContainer
    Batch message container for individual messages being published until they are batched and sent to broker.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      Clear the message batch container.
      void discard​(java.lang.Exception ex)
      Release the payload and clear the container.
      long getCurrentBatchSize()
      Get current message batch size of the message batch container in bytes.
      int getNumMessagesInBatch()
      Get count of messages in the message batch container.
      boolean isEmpty()
      Check the message batch container is empty.
      boolean isMultiBatches()
      Return the batch container batch message in multiple batches.
    • Method Detail

      • clear

        void clear()
        Clear the message batch container.
      • isEmpty

        boolean isEmpty()
        Check the message batch container is empty.
        Returns:
        return true if empty, otherwise return false.
      • getNumMessagesInBatch

        int getNumMessagesInBatch()
        Get count of messages in the message batch container.
        Returns:
        messages count
      • getCurrentBatchSize

        long getCurrentBatchSize()
        Get current message batch size of the message batch container in bytes.
        Returns:
        message batch size in bytes
      • discard

        void discard​(java.lang.Exception ex)
        Release the payload and clear the container.
        Parameters:
        ex - cause
      • isMultiBatches

        boolean isMultiBatches()
        Return the batch container batch message in multiple batches.
        Returns: