Interface PostOffice
-
- All Superinterfaces:
ActiveMQComponent
- All Known Implementing Classes:
PostOfficeImpl
public interface PostOffice extends ActiveMQComponent
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
-
Methods inherited from interface org.apache.activemq.artemis.core.server.ActiveMQComponent
asyncStop, isStarted, start, stop
-
-
-
-
Method Detail
-
addAddressInfo
boolean addAddressInfo(AddressInfo addressInfo) throws Exception
- Parameters:
addressInfo-- Returns:
- true if the address was added, false if it wasn't added
- Throws:
Exception
-
reloadAddressInfo
default void reloadAddressInfo(AddressInfo addressInfo) throws Exception
- Throws:
Exception
-
removeAddressInfo
AddressInfo removeAddressInfo(SimpleString address) throws Exception
- Throws:
Exception
-
removeAddressInfo
AddressInfo removeAddressInfo(SimpleString address, boolean force) throws Exception
- Throws:
Exception
-
getAddressInfo
AddressInfo getAddressInfo(SimpleString address)
-
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
QueueBinding updateQueue(QueueConfiguration queueConfiguration) throws Exception
- Throws:
Exception
-
updateQueue
QueueBinding updateQueue(QueueConfiguration queueConfiguration, boolean forceUpdate) throws Exception
- Parameters:
queueConfiguration-forceUpdate- Setting totruewill makenullvalues override current values too- Returns:
- Throws:
Exception
-
listQueuesForAddress
List<Queue> listQueuesForAddress(SimpleString address) throws Exception
- Throws:
Exception
-
removeBinding
Binding removeBinding(SimpleString uniqueName, Transaction tx, boolean deleteData) throws Exception
- Throws:
Exception
-
lookupBindingsForAddress
Bindings lookupBindingsForAddress(SimpleString address) throws Exception
It will lookup the Binding without creating an item on the Queue if non-existent- Parameters:
address-- Throws:
Exception
-
getBindingsForAddress
Bindings getBindingsForAddress(SimpleString address) throws Exception
Differently to lookupBindings, this will always create a new element on the Queue if non-existent- Parameters:
address-- Throws:
Exception
-
getBinding
Binding getBinding(SimpleString uniqueName)
-
getMatchingBindings
Collection<Binding> getMatchingBindings(SimpleString address) throws Exception
- Throws:
Exception
-
getDirectBindings
Collection<Binding> getDirectBindings(SimpleString address) throws Exception
- Throws:
Exception
-
getMatchingQueue
SimpleString getMatchingQueue(SimpleString address, RoutingType routingType) throws Exception
- Throws:
Exception
-
getMatchingQueue
SimpleString getMatchingQueue(SimpleString address, SimpleString queueName, RoutingType routingType) throws Exception
- Throws:
Exception
-
route
RoutingStatus route(Message message, boolean direct) throws Exception
- Throws:
Exception
-
route
RoutingStatus route(Message message, Transaction tx, boolean direct) throws Exception
- 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
RoutingStatus route(Message message, RoutingContext context, boolean direct) throws Exception
- 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- Parameters:
message-queue-tx-- Returns:
- Throws:
Exception
-
reload
MessageReference reload(Message message, Queue queue, Transaction tx) throws Exception
- Throws:
Exception
-
redistribute
Pair<RoutingContext,Message> redistribute(Message message, Queue originatingQueue) throws Exception
- Throws:
Exception
-
processRoute
void processRoute(Message message, RoutingContext context, boolean direct) throws Exception
- Throws:
Exception
-
getDuplicateIDCache
DuplicateIDCache getDuplicateIDCache(SimpleString address)
-
getDuplicateIDCache
DuplicateIDCache getDuplicateIDCache(SimpleString address, int idCacheSize)
-
sendQueueInfoToQueue
void sendQueueInfoToQueue(SimpleString queueName, SimpleString address) throws Exception
- Throws:
Exception
-
getNotificationLock
Object getNotificationLock()
-
startExpiryScanner
void startExpiryScanner()
-
startAddressQueueScanner
void startAddressQueueScanner()
-
isAddressBound
boolean isAddressBound(SimpleString address) throws Exception
- Throws:
Exception
-
getAddresses
Set<SimpleString> getAddresses()
-
getMirrorControlSource
MirrorController getMirrorControlSource()
-
setMirrorControlSource
PostOffice setMirrorControlSource(MirrorController mirrorControllerSource)
-
postAcknowledge
void postAcknowledge(MessageReference ref, AckReason reason)
-
scanAddresses
default void scanAddresses(MirrorController mirrorController) throws Exception
- Throws:
Exception
-
getAddressManager
default AddressManager getAddressManager()
-
preAcknowledge
default void preAcknowledge(Transaction tx, MessageReference ref, AckReason reason)
-
-