Interface QueueViewMBean

All Superinterfaces:
DestinationViewMBean
All Known Implementing Classes:
QueueView

public interface QueueViewMBean extends DestinationViewMBean
  • Method Details

    • getMessage

      CompositeData getMessage(String messageId) throws OpenDataException
      Retrieve a message from the destination's queue.
      Parameters:
      messageId - the message id of the message to retrieve
      Returns:
      A CompositeData object which is a JMX version of the messages
      Throws:
      OpenDataException
    • removeMessage

      boolean removeMessage(String messageId) throws Exception
      Removes a message from the queue. If the message has already been dispatched to another consumer, the message cannot be deleted and this method will return false.
      Parameters:
      messageId -
      Returns:
      true if the message was found and could be successfully deleted.
      Throws:
      Exception
    • removeMatchingMessages

      int removeMatchingMessages(String selector) throws Exception
      Removes the messages matching the given selector
      Returns:
      the number of messages removed
      Throws:
      Exception
    • removeMatchingMessages

      int removeMatchingMessages(String selector, int maximumMessages) throws Exception
      Removes the messages matching the given selector up to the maximum number of matched messages
      Returns:
      the number of messages removed
      Throws:
      Exception
    • purge

      void purge() throws Exception
      Removes all of the messages in the queue.
      Throws:
      Exception
    • copyMessageTo

      boolean copyMessageTo(String messageId, String destinationName) throws Exception
      Copies a given message to another destination.
      Parameters:
      messageId -
      destinationName -
      Returns:
      true if the message was found and was successfully copied to the other destination.
      Throws:
      Exception
    • copyMatchingMessagesTo

      int copyMatchingMessagesTo(String selector, String destinationName) throws Exception
      Copies the messages matching the given selector
      Returns:
      the number of messages copied
      Throws:
      Exception
    • copyMatchingMessagesTo

      int copyMatchingMessagesTo(String selector, String destinationName, int maximumMessages) throws Exception
      Copies the messages matching the given selector up to the maximum number of matched messages
      Returns:
      the number of messages copied
      Throws:
      Exception
    • moveMessageTo

      boolean moveMessageTo(String messageId, String destinationName) throws Exception
      Moves the message to another destination.
      Parameters:
      messageId -
      destinationName -
      Returns:
      true if the message was found and was successfully copied to the other destination.
      Throws:
      Exception
    • retryMessage

      boolean retryMessage(String messageId) throws Exception
      Moves a message back to its original destination
      Throws:
      Exception
    • moveMatchingMessagesTo

      int moveMatchingMessagesTo(String selector, String destinationName) throws Exception
      Moves the messages matching the given selector
      Returns:
      the number of messages removed
      Throws:
      Exception
    • moveMatchingMessagesTo

      int moveMatchingMessagesTo(String selector, String destinationName, int maximumMessages) throws Exception
      Moves the messages matching the given selector up to the maximum number of matched messages
      Throws:
      Exception
    • retryMessages

      int retryMessages() throws Exception
      Retries messages sent to the DLQ
      Throws:
      Exception
    • doesCursorHaveSpace

      boolean doesCursorHaveSpace()
      Returns:
      true if the message cursor has memory space available to page in more messages
    • isCursorFull

      boolean isCursorFull()
      Returns:
      true if the cursor has reached its memory limit for paged in messages
    • doesCursorHaveMessagesBuffered

      boolean doesCursorHaveMessagesBuffered()
      Returns:
      true if the cursor has messages buffered to deliver
    • getCursorMemoryUsage

      long getCursorMemoryUsage()
      Returns:
      the cursor memory usage in bytes
    • getCursorPercentUsage

      int getCursorPercentUsage()
      Returns:
      the cursor memory usage as a percentage
    • cursorSize

      int cursorSize()
      Returns:
      the number of messages available to be paged in by the cursor
    • isCacheEnabled

      boolean isCacheEnabled()
      Returns:
      true if caching is currently enabled of for the destination
    • getMessageGroups

      Map<String,String> getMessageGroups()
      Returns:
      a Map of groupNames and ConsumerIds
    • getMessageGroupType

      String getMessageGroupType()
      Returns:
      the message group type implementation (simple,bucket,cached)
    • removeMessageGroup

      void removeMessageGroup(String groupName)
      remove a message group = has the effect of rebalancing group
      Parameters:
      groupName -
    • removeAllMessageGroups

      void removeAllMessageGroups()
      remove all the message groups - will rebalance all message groups across consumers
    • pause

      void pause()
    • resume

      void resume()
    • isPaused

      boolean isPaused()