Interface EsbBrokerAdapter

All Known Implementing Classes:
ArtemisJolokiaAdapter, RabbitManagementAdapter

public interface EsbBrokerAdapter
Queue management through a broker's management API (spec section 8): queue depth and consumer counts, and actions on the broker's queues - including dead-letter queues and topic subscription queues, which are queues on the broker too (see EsbBrokerNames). Queues are named by their broker-side names. An action the broker doesn't support (per capabilities) throws UnsupportedOperationException, without calling the broker. Anything else that goes wrong - the API can't be reached, refuses the credentials, or reports an error, or the queue isn't there (except for getQueueInfo, which is then empty) - throws QException. Get an adapter for a provider from EsbBrokerAdapters.forProvider. Browsing messages is plain JMS, in EsbMessageBrowser.
  • Method Summary

    Modifier and Type
    Method
    Description
    The actions this adapter's broker supports.
    int
    deleteMessages(String brokerQueueName, List<String> messageIds)
    Remove the messages with these JMS message ids (as browsing shows them); returns how many were removed.
    int
    deleteMessagesOlderThan(String brokerQueueName, Instant cutoff)
    Remove the messages whose JMS timestamp is before the cutoff; returns how many were removed.
    getQueueInfo(String brokerQueueName)
    The queue's depth, consumer count, and paused state - or empty if the broker has no such queue.
    int
    moveMessages(String brokerQueueName, List<String> messageIds, String toBrokerQueueName)
    Move the messages with these JMS message ids to another (existing) queue; returns how many were moved.
    void
    pauseQueue(String brokerQueueName)
    Pause delivery to all of the queue's consumers (QQQ's and any others); messages keep arriving, and wait.
    long
    purgeQueue(String brokerQueueName)
    Remove all of the queue's messages; returns how many.
    void
    resumeQueue(String brokerQueueName)
    Resume delivery to the queue's consumers, after pauseQueue.
  • Method Details

    • capabilities

      EsbBrokerCapabilities capabilities()
      The actions this adapter's broker supports.
    • getQueueInfo

      Optional<EsbQueueInfo> getQueueInfo(String brokerQueueName) throws QException
      The queue's depth, consumer count, and paused state - or empty if the broker has no such queue.
      Throws:
      QException
    • pauseQueue

      void pauseQueue(String brokerQueueName) throws QException
      Pause delivery to all of the queue's consumers (QQQ's and any others); messages keep arriving, and wait. UnsupportedOperationException if !capabilities().pauseQueue().
      Throws:
      QException
    • resumeQueue

      void resumeQueue(String brokerQueueName) throws QException
      Resume delivery to the queue's consumers, after pauseQueue. UnsupportedOperationException if !capabilities().pauseQueue().
      Throws:
      QException
    • purgeQueue

      long purgeQueue(String brokerQueueName) throws QException
      Remove all of the queue's messages; returns how many. UnsupportedOperationException if !capabilities().purge().
      Throws:
      QException
    • deleteMessages

      int deleteMessages(String brokerQueueName, List<String> messageIds) throws QException
      Remove the messages with these JMS message ids (as browsing shows them); returns how many were removed. With no ids, removes nothing. UnsupportedOperationException if !capabilities().deleteSelected().
      Throws:
      QException
    • deleteMessagesOlderThan

      int deleteMessagesOlderThan(String brokerQueueName, Instant cutoff) throws QException
      Remove the messages whose JMS timestamp is before the cutoff; returns how many were removed. UnsupportedOperationException if !capabilities().deleteOlderThan().
      Throws:
      QException
    • moveMessages

      int moveMessages(String brokerQueueName, List<String> messageIds, String toBrokerQueueName) throws QException
      Move the messages with these JMS message ids to another (existing) queue; returns how many were moved. With no ids, moves nothing. UnsupportedOperationException if !capabilities().move().
      Throws:
      QException