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 TypeMethodDescriptionThe actions this adapter's broker supports.intdeleteMessages(String brokerQueueName, List<String> messageIds) Remove the messages with these JMS message ids (as browsing shows them); returns how many were removed.intdeleteMessagesOlderThan(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.intmoveMessages(String brokerQueueName, List<String> messageIds, String toBrokerQueueName) Move the messages with these JMS message ids to another (existing) queue; returns how many were moved.voidpauseQueue(String brokerQueueName) Pause delivery to all of the queue's consumers (QQQ's and any others); messages keep arriving, and wait.longpurgeQueue(String brokerQueueName) Remove all of the queue's messages; returns how many.voidresumeQueue(String brokerQueueName) Resume delivery to the queue's consumers, after pauseQueue.
-
Method Details
-
capabilities
EsbBrokerCapabilities capabilities()The actions this adapter's broker supports. -
getQueueInfo
The queue's depth, consumer count, and paused state - or empty if the broker has no such queue.- Throws:
QException
-
pauseQueue
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
Resume delivery to the queue's consumers, after pauseQueue. UnsupportedOperationException if !capabilities().pauseQueue().- Throws:
QException
-
purgeQueue
Remove all of the queue's messages; returns how many. UnsupportedOperationException if !capabilities().purge().- Throws:
QException
-
deleteMessages
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
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
-