public class QueueManagementBeans extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_EXCHANGE |
static String |
DIRECT_EXCHANGE |
Constructor and Description |
---|
QueueManagementBeans() |
Modifier and Type | Method and Description |
---|---|
List<Message> |
browseQueue(String queueName,
long nextMessageIdToRead,
int maxMessageCount)
Invoke service bean to retrieve browse messages list
|
void |
createQueue(String queueName,
String userName)
Invoke service bean to creates a new queue.
|
void |
deleteMessagesFromDeadLetterQueue(long[] messageIDs,
String destinationQueueName)
Invoke service bean for permanently deleting messages from the Dead Letter Channel.
|
void |
deleteQueue(String queueName)
Deletes a queue.
|
List<Queue> |
getAllQueueCounts()
Invoke service bean to get the message count of each queue stored
|
Queue |
getDLCQueue(String DLCQueueName)
Get DLC queue registered in broker by given name (tenant information included)
|
static QueueManagementBeans |
getInstance()
Gets the active queue managing instance.
|
long |
getMessageCount(String queueName,
String msgPattern)
Invoke service bean to get the message count for a destination.
|
Set<String> |
getNamesOfAllDurableQueues()
Invoke service bean to retrieve names of all durable queues
|
void |
purgeMessagesFromQueue(String queueName,
String userName)
Invoke service bean to delete all messages of a queue.
|
static boolean |
queueExists(String queueName)
Invoke service bean to check whether a queue exists.
|
long |
rerouteSelectedMessagesFromDeadLetterChannel(long[] messageIDs,
String newDestinationQueueName,
String destinationQueueName)
Invoke service bean for restoring messages from Dead Letter Channel to a given destination.
|
long |
restoreSelectedMessagesFromDeadLetterChannel(long[] messageIDs,
String destinationQueueName)
Invoke service bean for restoring messages from Dead Letter Channel to their original destinations.
|
public static final String DIRECT_EXCHANGE
public static final String DEFAULT_EXCHANGE
public static QueueManagementBeans getInstance()
public void createQueue(String queueName, String userName) throws QueueManagerException
queueName
- The queue name.userName
- The user name of the queue ownerQueueManagerException
public List<Queue> getAllQueueCounts() throws QueueManagerException
QueueManagerException
public Queue getDLCQueue(String DLCQueueName) throws QueueManagerException
DLCQueueName
- name of the queueQueueManagerException
public long getMessageCount(String queueName, String msgPattern) throws QueueManagerException
queueName
- The destination name.msgPattern
- The value can be either "queue" or "topic".QueueManagerException
public void deleteQueue(String queueName) throws QueueManagerException
queueName
- Queue name to delete.QueueManagerException
public 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
public long restoreSelectedMessagesFromDeadLetterChannel(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
public long rerouteSelectedMessagesFromDeadLetterChannel(long[] messageIDs, String newDestinationQueueName, String destinationQueueName) throws QueueManagerException
messageIDs
- Browser message Id / External message Id list to be deletednewDestinationQueueName
- The new destination for the messages in the same tenantdestinationQueueName
- Dead Letter Queue name for the respective tenantQueueManagerException
public void purgeMessagesFromQueue(String queueName, String userName) throws QueueManagerException
queueName
- The name of the queue.userName
- The username of the queue owner.QueueManagerException
public static boolean queueExists(String queueName) throws QueueManagerException
queueName
- The queue name.QueueManagerException
public List<Message> browseQueue(String queueName, long nextMessageIdToRead, int maxMessageCount) throws QueueManagerException
queueName
- name of queue to browsenextMessageIdToRead
- next start message id to get message listmaxMessageCount
- number of message count per pageMessage
QueueManagerException
public Set<String> getNamesOfAllDurableQueues() throws QueueManagerException
QueueManagerException
Copyright © 2023 WSO2. All rights reserved.