Interface IMessageBrowser

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      IMessage peek()
      reads next the active message without changing the state of the receiver or the message source.
      IMessage peek​(long fromSequenceNumber)
      Reads next the active message without changing the state of the receiver or the message source.
      CompletableFuture<IMessage> peekAsync()
      Asynchronously reads the active messages without changing the state of the receiver or the message source.
      CompletableFuture<IMessage> peekAsync​(long fromSequenceNumber)
      Asynchronously reads next the active message without changing the state of the receiver or the message source.
      Collection<IMessage> peekBatch​(int messageCount)
      Reads next batch of the active messages without changing the state of the receiver or the message source.
      Collection<IMessage> peekBatch​(long fromSequenceNumber, int messageCount)
      Reads next batch of the active messages without changing the state of the receiver or the message source.
      CompletableFuture<Collection<IMessage>> peekBatchAsync​(int messageCount)
      Asynchronously reads the next batch of active messages without changing the state of the receiver or the message source.
      CompletableFuture<Collection<IMessage>> peekBatchAsync​(long fromSequenceNumber, int messageCount)
      Asynchronously reads the next batch of active messages without changing the state of the receiver or the message source.
    • Method Detail

      • peekBatch

        Collection<IMessage> peekBatch​(long fromSequenceNumber,
                                       int messageCount)
                                throws InterruptedException,
                                       ServiceBusException
        Reads next batch of the active messages without changing the state of the receiver or the message source.
        Parameters:
        fromSequenceNumber - The sequence number from where to read the message.
        messageCount - The number of messages.
        Returns:
        Batch of Message peeked
        Throws:
        InterruptedException - if the current thread was interrupted while waiting
        ServiceBusException - if peek failed
      • peekAsync

        CompletableFuture<IMessage> peekAsync()
        Asynchronously reads the active messages without changing the state of the receiver or the message source.
        Returns:
        Message peeked
      • peekAsync

        CompletableFuture<IMessage> peekAsync​(long fromSequenceNumber)
        Asynchronously reads next the active message without changing the state of the receiver or the message source.
        Parameters:
        fromSequenceNumber - The sequence number from where to read the message.
        Returns:
        CompletableFuture that returns Message peeked.
      • peekBatchAsync

        CompletableFuture<Collection<IMessage>> peekBatchAsync​(int messageCount)
        Asynchronously reads the next batch of active messages without changing the state of the receiver or the message source.
        Parameters:
        messageCount - The number of messages.
        Returns:
        CompletableFuture that returns batch of Message peeked.
      • peekBatchAsync

        CompletableFuture<Collection<IMessage>> peekBatchAsync​(long fromSequenceNumber,
                                                               int messageCount)
        Asynchronously reads the next batch of active messages without changing the state of the receiver or the message source.
        Parameters:
        fromSequenceNumber - The sequence number from where to read the message.
        messageCount - The number of messages.
        Returns:
        CompletableFuture that returns batch of Message peeked.