Interface PostOffice
- All Superinterfaces:
ActiveMQComponent
- All Known Implementing Classes:
PostOfficeImpl
A PostOffice instance maintains a mapping of a String address to a Queue. Multiple Queue instances can be bound with
the same String address.
Given a message and an address a PostOffice instance will route that message to all the Queue instances that are registered with that address.
Addresses can be any String instance.
A Queue instance can only be bound against a single address in the post office.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAddressInfo(AddressInfo addressInfo) Returns true if the address was added, false if it wasn't added.voidaddBinding(Binding binding) findLocalBinding(long bindingID) default QueuefindQueue(long bindingID) getAddressInfo(SimpleString address) default AddressManagergetBinding(SimpleString uniqueName) getBindingsForAddress(SimpleString address) Differently to lookupBindings, this will always create a new element on the Queue if non-existentgetDirectBindings(SimpleString address) getDuplicateIDCache(SimpleString address) getDuplicateIDCache(SimpleString address, int idCacheSize) getMatchingBindings(SimpleString address) getMatchingQueue(SimpleString address, RoutingType routingType) getMatchingQueue(SimpleString address, SimpleString queueName, RoutingType routingType) booleanisAddressBound(SimpleString address) listQueuesForAddress(SimpleString address) lookupBindingsForAddress(SimpleString address) It will lookup the Binding without creating an item on the Queue if non-existentvoidpostAcknowledge(MessageReference ref, AckReason reason) default voidpreAcknowledge(Transaction tx, MessageReference ref, AckReason reason) voidprocessRoute(Message message, RoutingContext context, boolean direct) redistribute(Message message, Queue originatingQueue) reload(Message message, Queue queue, Transaction tx) default voidreloadAddressInfo(AddressInfo addressInfo) removeAddressInfo(SimpleString address) removeAddressInfo(SimpleString address, boolean force) removeBinding(SimpleString uniqueName, Transaction tx, boolean deleteData) default MessageReferencereroute(Message message, Queue queue, Transaction tx) Deprecated.route(Message message, RoutingContext context, boolean direct) route(Message message, RoutingContext context, boolean direct, boolean rejectDuplicates, Binding binding) route(Message message, Transaction tx, boolean direct) route(Message message, Transaction tx, boolean direct, boolean rejectDuplicates) route(Message message, Transaction tx, boolean direct, boolean rejectDuplicates, Binding binding) default voidscanAddresses(MirrorController mirrorController) voidsendQueueInfoToQueue(SimpleString queueName, SimpleString address) setMirrorControlSource(MirrorController mirrorControllerSource) voidvoidupdateAddressInfo(SimpleString addressName, EnumSet<RoutingType> routingTypes) updateQueue(QueueConfiguration queueConfiguration) updateQueue(QueueConfiguration queueConfiguration, boolean forceUpdate) Update a queue's configuration.updateQueue(SimpleString name, RoutingType routingType, Filter filter, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, SimpleString user, Boolean configurationManaged) Deprecated.updateQueue(SimpleString name, RoutingType routingType, Filter filter, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, SimpleString user, Boolean configurationManaged, Long ringSize) Deprecated.Methods inherited from interface org.apache.activemq.artemis.core.server.ActiveMQComponent
asyncStop, isStarted, start, stop
-
Method Details
-
addAddressInfo
Returns true if the address was added, false if it wasn't added.- Returns:
- true if the address was added, false if it wasn't added
- Throws:
Exception
-
reloadAddressInfo
- Throws:
Exception
-
removeAddressInfo
- Throws:
Exception
-
removeAddressInfo
- Throws:
Exception
-
getAddressInfo
-
updateAddressInfo
AddressInfo updateAddressInfo(SimpleString addressName, EnumSet<RoutingType> routingTypes) throws Exception - Throws:
Exception
-
updateQueue
@Deprecated QueueBinding updateQueue(SimpleString name, RoutingType routingType, Filter filter, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, SimpleString user, Boolean configurationManaged) throws Exception Deprecated.- Throws:
Exception
-
updateQueue
@Deprecated QueueBinding updateQueue(SimpleString name, RoutingType routingType, Filter filter, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, SimpleString user, Boolean configurationManaged, Long ringSize) throws Exception Deprecated.- Throws:
Exception
-
updateQueue
- Throws:
Exception
-
updateQueue
QueueBinding updateQueue(QueueConfiguration queueConfiguration, boolean forceUpdate) throws Exception Update a queue's configuration.- Parameters:
forceUpdate- Setting totruewill makenullvalues override current values too- Throws:
Exception
-
listQueuesForAddress
- Throws:
Exception
-
addBinding
- Throws:
Exception
-
removeBinding
- Throws:
Exception
-
lookupBindingsForAddress
It will lookup the Binding without creating an item on the Queue if non-existent- Throws:
Exception
-
findLocalBinding
-
findQueue
-
getBindingsForAddress
Differently to lookupBindings, this will always create a new element on the Queue if non-existent- Throws:
Exception
-
getBinding
-
getMatchingBindings
- Throws:
Exception
-
getDirectBindings
- Throws:
Exception
-
getAllBindings
-
getMatchingQueue
- Throws:
Exception
-
getMatchingQueue
SimpleString getMatchingQueue(SimpleString address, SimpleString queueName, RoutingType routingType) throws Exception - Throws:
Exception
-
route
- Throws:
Exception
-
route
- Throws:
Exception
-
route
RoutingStatus route(Message message, Transaction tx, boolean direct, boolean rejectDuplicates) throws Exception - Throws:
Exception
-
route
RoutingStatus route(Message message, Transaction tx, boolean direct, boolean rejectDuplicates, Binding binding) throws Exception - Throws:
Exception
-
route
- Throws:
Exception
-
route
RoutingStatus route(Message message, RoutingContext context, boolean direct, boolean rejectDuplicates, Binding binding) throws Exception - Throws:
Exception
-
reroute
@Deprecated default MessageReference reroute(Message message, Queue queue, Transaction tx) throws Exception Deprecated.This method was renamed as reload, use the new method instead- Throws:
Exception
-
reload
- Throws:
Exception
-
redistribute
- Throws:
Exception
-
processRoute
- Throws:
Exception
-
getDuplicateIDCache
-
getDuplicateIDCache
-
sendQueueInfoToQueue
- Throws:
Exception
-
getNotificationLock
Object getNotificationLock() -
startExpiryScanner
void startExpiryScanner() -
startAddressQueueScanner
void startAddressQueueScanner() -
isAddressBound
- Throws:
Exception
-
getAddresses
Set<SimpleString> getAddresses() -
getMirrorControlSource
MirrorController getMirrorControlSource() -
setMirrorControlSource
-
postAcknowledge
-
scanAddresses
- Throws:
Exception
-
getAddressManager
-
preAcknowledge
-