public interface QueueManagerService
Modifier and Type | Method and Description |
---|---|
void |
addQueueAndAssignPermission(String queueName,
QueueRolePermission[] queueRolePermissions)
Create a queue and assign permissions which could be be pub, consume, change permission and etc.
|
Message[] |
browseQueue(String nameOfQueue,
long nextMessageIdToRead,
int maxMsgCount)
Gets the messages of a queue
|
void |
createQueue(String queueName)
Creates a new queue
|
void |
deleteMessagesFromDeadLetterQueue(long[] messageIDs,
String destinationQueueName)
Delete messages from the Dead Letter Queue and delete their content.
|
void |
deleteQueue(String queueName)
This method is triggered when deleting a queue through management console.
|
void |
deleteTopicFromRegistry(String topicName,
String subscriptionId)
This method is triggered unsubscribe from a durable subscription to delete topic related
entries from registry
|
void |
dumpMessageStatus()
Dump message status to a default file.
|
List<Queue> |
getAllQueues()
Gets all the queues
|
String[] |
getBackendRoles()
Gets roles except for admin
|
Queue |
getDLCQueue(String tenantDomain)
Retrieve the dlc queue associated to a tenant
|
long |
getMessageCount(String destinationName,
String msgPattern)
Gets the message count for a queue
|
Message[] |
getMessageMetadataInDLC(String targetQueue,
long startMessageId,
int pageLimit)
Returns a paginated list of message metadata destined for the inputQueueName but currently living in the Dead Letter Channel.
|
Message[] |
getMessagesInDLCForQueue(String queueName,
long nextMessageIdToRead,
int maxMessageCount)
Gets the messages in the DLC for a specific queue.
|
Set<String> |
getNamesOfAllDurableQueues()
Retrieve names of all durable queues created
|
long |
getNumberOfMessagesInDLCForQueue(String queueName)
Gets the number of messages in DLC for a specific queue.
|
Queue |
getQueueByName(String queueName)
Retrieve a queue with the number of the messages remaining by passing the name
|
QueueRolePermission[] |
getQueueRolePermission(String queueName)
Gets role permissions assigned to a queue
|
long |
getTotalMessagesInQueue(String queueName)
Gets total message count in a queue
|
void |
purgeMessagesOfQueue(String queueName)
Request broker to clean all messages not awaiting acknowledgement from the given queue.
|
int |
rerouteMessagesFromDeadLetterChannelForQueue(String sourceQueue,
String targetQueue,
int internalBatchSize)
Restore messages destined for the input sourceQueue into a different targetQueue.
|
long |
rerouteSelectedMessagesFromDeadLetterChannel(long[] messageIDs,
String newDestinationQueueName,
String destinationQueueName)
Restore messages from the Dead Letter Queue to another queue in the same tenant.
|
long |
restoreSelectedMessagesFromDeadLetterChannel(long[] messageIDs,
String destinationQueueName)
Restore messages from the Dead Letter Queue to their original queues.
|
boolean |
sendMessage(String nameOfQueue,
String userName,
String accessKey,
String jmsType,
String jmsCorrelationID,
int numberOfMessages,
String message,
int deliveryMode,
int priority,
long expireTime)
Send a message to the queue
|
void |
updatePermission(String queueName,
QueueRolePermission[] queueRolePermissions)
Updates permission for a queue.
|
void createQueue(String queueName) throws QueueManagerException
queueName
- new queue nameQueueManagerException
Queue getQueueByName(String queueName) throws QueueManagerException
queueName
- the name of the queue to be retrievedQueue
the queueQueueManagerException
Set<String> getNamesOfAllDurableQueues() throws QueueManagerException
QueueManagerException
- on an issue getting informationQueue getDLCQueue(String tenantDomain) throws QueueManagerException
tenantDomain
- The name of the tenant domainQueue
the dlc queueQueueManagerException
List<Queue> getAllQueues() throws QueueManagerException
Queue
queuesQueueManagerException
void deleteQueue(String queueName) throws QueueManagerException
queueName
- name of the queueQueueManagerException
void deleteTopicFromRegistry(String topicName, String subscriptionId) throws QueueManagerException
topicName
- Topic namesubscriptionId
- Subscription IDQueueManagerException
long restoreSelectedMessagesFromDeadLetterChannel(long[] messageIDs, String destinationQueueName) throws QueueManagerException
messageIDs
- Browser Message Id / External Message Id listdestinationQueueName
- Dead Letter Queue name for the respective tenantQueueManagerException
long rerouteSelectedMessagesFromDeadLetterChannel(long[] messageIDs, String newDestinationQueueName, String destinationQueueName) throws QueueManagerException
messageIDs
- Browser Message Id / External Message Id listnewDestinationQueueName
- The new destination queue for the messages in the same tenantdestinationQueueName
- Dead Letter Queue name for the respective tenantQueueManagerException
void deleteMessagesFromDeadLetterQueue(long[] messageIDs, String destinationQueueName) throws QueueManagerException
messageIDs
- Browser Message Id / External Message Id list to be deleteddestinationQueueName
- Dead Letter Queue name for the respective tenantQueueManagerException
void purgeMessagesOfQueue(String queueName) throws QueueManagerException
queueName
- the queue nameQueueManagerException
long getMessageCount(String destinationName, String msgPattern) throws QueueManagerException
destinationName
- the destination name. the name of the queue or topicmsgPattern
- The exchange type used to transfer messages with the given destinationName. e.g. "queue" or "topic"QueueManagerException
void updatePermission(String queueName, QueueRolePermission[] queueRolePermissions) throws QueueManagerException
queueName
- the queue namequeueRolePermissions
- the new permissions for the queueQueueManagerException
void addQueueAndAssignPermission(String queueName, QueueRolePermission[] queueRolePermissions) throws QueueManagerException
queueName
- the queue namequeueRolePermissions
- the new permissions for the queueQueueManagerException
String[] getBackendRoles() throws QueueManagerException
QueueManagerException
QueueRolePermission[] getQueueRolePermission(String queueName) throws QueueManagerException
queueName
- the queue nameQueueManagerException
Message[] browseQueue(String nameOfQueue, long nextMessageIdToRead, int maxMsgCount) throws QueueManagerException
nameOfQueue
- name of the queuenextMessageIdToRead
- next start message id to get message listmaxMsgCount
- the maximum messages to returnQueueManagerException
long getTotalMessagesInQueue(String queueName) throws QueueManagerException
queueName
- the queue nameQueueManagerException
boolean sendMessage(String nameOfQueue, String userName, String accessKey, String jmsType, String jmsCorrelationID, int numberOfMessages, String message, int deliveryMode, int priority, long expireTime) throws QueueManagerException
nameOfQueue
- name of the queueuserName
- the user name for the amqp urlaccessKey
- the access key for the amqp urljmsType
- the JMS type of the messagejmsCorrelationID
- the correlation ID of the JMS messagenumberOfMessages
- number of messages to sendmessage
- the message content/bodydeliveryMode
- the delivery modepriority
- priority of the messageexpireTime
- message expire timeQueueManagerException
long getNumberOfMessagesInDLCForQueue(String queueName) throws QueueManagerException
queueName
- The name of the queue.QueueManagerException
Message[] getMessagesInDLCForQueue(String queueName, long nextMessageIdToRead, int maxMessageCount) throws QueueManagerException
queueName
- name of the queuenextMessageIdToRead
- next start message id to get message listmaxMessageCount
- the maximum messages to returnQueueManagerException
- if an exception occurs when invoking the MBean Service.void dumpMessageStatus() throws AndesException
AndesException
Message[] getMessageMetadataInDLC(String targetQueue, long startMessageId, int pageLimit) throws QueueManagerException
targetQueue
- Name of the destination queuestartMessageId
- Start point of the queue message id to start readingpageLimit
- Maximum messages required in a single responseorg.wso2.carbon.andes.admin.internal.Message
QueueManagerException
- if an error occurs while invoking the MBean to fetch messages.int rerouteMessagesFromDeadLetterChannelForQueue(String sourceQueue, String targetQueue, int internalBatchSize) throws QueueManagerException
sourceQueue
- Name of the source queuetargetQueue
- Name of the target queue.internalBatchSize
- even with this method, the MB server will internally read messages in DLC in batches,
and simulate each batch as a new message list to the targetQueue. internalBatchSize
controls the number of messages processed in a single batch internally.QueueManagerException
- if an exception occurs while invoking the MBean service.Copyright © 2017 WSO2. All rights reserved.