Interface ActiveMQServer
- All Superinterfaces:
ActiveMQComponent,ServiceComponent
- All Known Implementing Classes:
ActiveMQServerImpl
This interface defines the internal interface of the ActiveMQ Artemis Server exposed to other components of the
server.
This is not part of our public API.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidaddActivationParam(String key, Object val) booleanaddAddressInfo(AddressInfo addressInfo) Add theAddressInfoto the brokerbooleanaddClientConnection(String clientId, boolean unique) voidaddExternalComponent(ActiveMQComponent externalComponent, boolean start) Adding external components is allowed only if the stateisn'tActiveMQServer.SERVER_STATE.STOPPEDorActiveMQServer.SERVER_STATE.STOPPING.addOrUpdateAddressInfo(AddressInfo addressInfo) A convenience method to combine the functionality ofaddAddressInfoandupdateAddressInfo.voidadd a ProtocolManagerFactory to be used.addressQuery(SimpleString name) voidaddScaledDownNode(SimpleString scaledDownNodeId) voidautoRemoveAddressInfo(SimpleString address, SecurityAuth auth) Remove anAddressInfofrom the broker.default BindingQueryResultbindingQuery(SimpleString address) bindingQuery(SimpleString address, boolean newFQQN) voidAlert activation failure listeners of a failure.voidvoidvoidvoidvoidvoidvoidvoidvoidbooleancallBrokerMessagePluginsCanAccept(ServerConsumer serverConsumer, MessageReference messageReference) voidcallBrokerPlugins(ActiveMQPluginRunnable pluginRun) voidvoidvoidvoidcallPostQueueCreationCallbacks(SimpleString queueName) voidcallPostQueueDeletionCallbacks(SimpleString address, SimpleString queueName) voidcheckQueueCreationLimit(String username) voidcreateBackupServer(Configuration configuration) createInternalSession(String name, int minLargeMessageSize, RemotingConnection remotingConnection, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean xa, String defaultAddress, SessionCallback callback, boolean autoCreateQueues, OperationContext context, Map<SimpleString, RoutingType> prefixes, String securityDomain, boolean isLegacyProducer) This is to be used in places where security is bypassed, like internal sessions, broker connections, etc...createQueue(QueueConfiguration queueConfiguration) Overloaded version ofcreateQueue(QueueConfiguration, boolean)where thebooleanparameter is alwaysfalse(i.e. if the queue already exists then an exception will be thrown).createQueue(QueueConfiguration queueConfiguration, boolean ignoreIfExists) This method creates a queue based on theQueueConfigurationinput.createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary) Deprecated.createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreateAddress) Deprecated.createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress) Deprecated.createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress) Deprecated.createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress, long ringSize) Deprecated.createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString user, SimpleString filterString, boolean durable, boolean temporary) Deprecated.createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreateAddress) Deprecated.createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean lastValue, boolean autoCreateAddress) Deprecated.createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress) Deprecated.createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress) Deprecated.createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress, long ringSize) Deprecated.createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, boolean autoCreateAddress) Deprecated.createQueue(SimpleString address, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary) Deprecated.createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, boolean autoCreateAddress) Deprecated.createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue, boolean autoCreateAddress) Deprecated.createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreateAddress) Deprecated.createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreateAddress) Deprecated.createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreateAddress, Long ringSize) Deprecated.createSession(String name, String username, String password, int minLargeMessageSize, RemotingConnection remotingConnection, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean xa, String defaultAddress, SessionCallback callback, boolean autoCreateQueues, OperationContext context, Map<SimpleString, RoutingType> prefixes, String securityDomain, String validatedUser, boolean isLegacyProducer) voidcreateSharedQueue(QueueConfiguration queueConfiguration) This method is essentially the same ascreateQueue(QueueConfiguration, boolean)with a few key exceptions.voidcreateSharedQueue(SimpleString address, RoutingType routingType, SimpleString name, SimpleString filterString, SimpleString user, boolean durable) Deprecated.voidcreateSharedQueue(SimpleString address, RoutingType routingType, SimpleString name, SimpleString filterString, SimpleString user, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean lastValue) Deprecated.voidcreateSharedQueue(SimpleString address, RoutingType routingType, SimpleString name, SimpleString filterString, SimpleString user, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteTimeout, long autoDeleteMessageCount) Deprecated.voidcreateSharedQueue(SimpleString address, RoutingType routingType, SimpleString name, SimpleString filterString, SimpleString user, boolean durable, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount) Deprecated.booleandeployBridge(BridgeConfiguration config) deployDivert(DivertConfiguration config) voiddeployQueue(String address, String queue, String filter, boolean durable, boolean temporary) Deprecated.deployQueue(SimpleString address, SimpleString queue, SimpleString filter, boolean durable, boolean temporary) Deprecated.describe()voiddestroyBridge(String name) destroyConnectionWithSessionMetadata(String metaKey, String metaValue) voiddestroyDivert(SimpleString name) voiddestroyDivert(SimpleString name, boolean deleteFromStorage) voiddestroyQueue(SimpleString queueName) voiddestroyQueue(SimpleString queueName, SecurityAuth session) voiddestroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount) voiddestroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers) voiddestroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean forceAutoDeleteAddress) voiddestroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean forceAutoDeleteAddress, boolean checkMessageCount) voidfail(boolean failoverOnServerShutdown) Returns the resource to manage this ActiveMQ Artemis server.getAddressInfo(SimpleString address) intdoubleThe server has a default listener that will propagate errors to registered listeners.intgetSessionByID(String sessionID) intgetSessions(String connectionID) getState()default StringlonglonglonglonglonglonglongbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanhasScaledDown(SimpleString scaledDownNodeId) voidinstallMirrorController(MirrorController mirrorController) booleanisActive()booleanisAddressBound(String address) Returnstrueif there is a binding for this address (i.e. if there is a created queue).booleanshould the server rebuild page counters upon startup. this will be useful on testing or an embedded broker scenariobooleanReturns whether the initial replication synchronization process with the backup server is complete; applicable for either the primary or backup server.default QueuelocateQueue(String queueName) default QueuelocateQueue(String address, String queue) locateQueue(SimpleString queueName) voidit will hold a lock for the activation.lookupSession(String metakey, String metavalue) Returns a session containing the meta-key and meata-value.queueQuery(SimpleString name) voidregisterActivateCallback(ActivateCallback callback) voidRegister a listener to detect problems during activationvoidregisterBrokerConnection(BrokerConnection brokerConnection) voidvoidvoidRegister a listener to detect I/O Critical errorsvoidRegister aPostQueueDeletionCallbackto be called after a queue is created.voidRegister aPostQueueDeletionCallbackto be called after a queue is deleted.voidregisterQueueOnManagement(Queue queue) voidregisterRecordsLoader(Consumer<RecordInfo> recordsLoader) voidvoidremoveAddressInfo(SimpleString address, SecurityAuth auth) Remove anAddressInfofrom the broker.voidremoveAddressInfo(SimpleString address, SecurityAuth auth, boolean force) Remove anAddressInfofrom the broker.voidremoveClientConnection(String clientId) voidvoidvoidremoveSession(String name) voidvoidscanAddresses(MirrorController mirrorController) This method will scan all queues and addresses. it is supposed to be called before the mirrorController is startedvoidsetGroupingHandler(GroupingHandler groupingHandler) voidsetHAPolicy(HAPolicy haPolicy) voidsetIdentity(String identity) Sets the server identity.voidsetMBeanServer(MBeanServer mBeanServer) default voidsetProperties(String fileUrltoBrokerProperties) voidsetRebuildCounters(boolean rebuildCounters) should the server rebuild page counters upon startup. this will be useful on testing or an embedded broker scenariovoidsetSecurityManager(ActiveMQSecurityManager securityManager) voidvoidstartBrokerConnection(String name) voidstop(boolean failoverOnServerShutdown, boolean isExit) voidstopBrokerConnection(String name) voidvoidundeployFederation(String name) voidit will release hold a lock for the activation.voidunregisterActivateCallback(ActivateCallback callback) voidRemove a previously registered failure listenervoidunregisterBrokerConnection(BrokerConnection brokerConnection) Removes the given broker connection from the tracked set of active broker connection entries.voidvoidUnregister aPostQueueCreationCallback.voidUnregister aPostQueueDeletionCallback.booleanupdateAddressInfo(SimpleString address, Collection<RoutingType> routingTypes) Deprecated.booleanupdateAddressInfo(SimpleString address, EnumSet<RoutingType> routingTypes) Updates anAddressInfoon the broker with the specified routing types.updateDivert(DivertConfiguration config) updateQueue(String name, RoutingType routingType, Integer maxConsumers, Boolean purgeOnNoConsumers) Deprecated.updateQueue(String name, RoutingType routingType, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive) Deprecated.updateQueue(String name, RoutingType routingType, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, String user) Deprecated.updateQueue(String name, RoutingType routingType, String filterString, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, String user) Deprecated.updateQueue(String name, RoutingType routingType, String filterString, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, String groupFirstQueue, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, String user) Deprecated.updateQueue(String name, RoutingType routingType, String filterString, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, String groupFirstQueue, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, String user, Long ringSize) Deprecated.updateQueue(QueueConfiguration queueConfiguration) Update the queue named in theQueueConfigurationwith the corresponding properties.updateQueue(QueueConfiguration queueConfiguration, boolean forceUpdate) Update a queue's configuration.voidupdateStatus(String component, String statusJson) validateUser(String username, String password, RemotingConnection connection, String securityDomain) booleanwaitForActivation(long timeout, TimeUnit unit) Wait for server initialization.Methods inherited from interface org.apache.activemq.artemis.core.server.ActiveMQComponent
asyncStop, isStarted, start, stopMethods inherited from interface org.apache.activemq.artemis.core.server.ServiceComponent
stop
-
Method Details
-
managementLock
- Throws:
Exception
-
setState
-
getState
ActiveMQServer.SERVER_STATE getState() -
setIdentity
Sets the server identity.The identity will be exposed on logs. It may help to debug issues on the log traces and debugs.
This method was created mainly for testing but it may be used in scenarios where you need to have more than one Server inside the same VM.
-
getIdentity
String getIdentity() -
describe
String describe() -
addActivationParam
-
getConfiguration
Configuration getConfiguration() -
installMirrorController
-
scanAddresses
This method will scan all queues and addresses. it is supposed to be called before the mirrorController is started- Throws:
Exception
-
getMirrorController
MirrorController getMirrorController() -
removeMirrorControl
void removeMirrorControl() -
getServiceRegistry
ServiceRegistry getServiceRegistry() -
getRemotingService
RemotingService getRemotingService() -
getStorageManager
StorageManager getStorageManager() -
getPagingManager
PagingManager getPagingManager() -
createPagingManager
- Throws:
Exception
-
getManagementService
ManagementService getManagementService() -
getSecurityManager
ActiveMQSecurityManager getSecurityManager() -
getNetworkHealthCheck
NetworkHealthCheck getNetworkHealthCheck() -
getVersion
Version getVersion() -
getNodeManager
NodeManager getNodeManager() -
getCriticalAnalyzer
CriticalAnalyzer getCriticalAnalyzer() -
updateStatus
-
unlockActivation
void unlockActivation()it will release hold a lock for the activation. -
lockActivation
void lockActivation()it will hold a lock for the activation. This will prevent the activation from happening. -
getIoCriticalErrorListener
IOCriticalErrorListener getIoCriticalErrorListener()The server has a default listener that will propagate errors to registered listeners. This will return the main listener -
getActiveMQServerControl
ActiveMQServerControlImpl getActiveMQServerControl()Returns the resource to manage this ActiveMQ Artemis server.- Returns:
- the resource to manage this ActiveMQ Artemis server
- Throws:
IllegalStateException- if the server is not properly started.
-
registerActivateCallback
-
unregisterActivateCallback
-
registerActivationFailureListener
Register a listener to detect problems during activation- See Also:
-
registerIOCriticalErrorListener
Register a listener to detect I/O Critical errors- See Also:
-
replay
- Throws:
Exception
-
unregisterActivationFailureListener
Remove a previously registered failure listener -
callActivationFailureListeners
Alert activation failure listeners of a failure.- Parameters:
e- the exception that caused the activation failure
-
registerPostQueueCreationCallback
Register aPostQueueDeletionCallbackto be called after a queue is created.- Parameters:
callback- thePostQueueCreationCallbackto call after a queue is created
-
unregisterPostQueueCreationCallback
Unregister aPostQueueCreationCallback.- Parameters:
callback- thePostQueueCreationCallbackto unregister
-
callPostQueueCreationCallbacks
- Throws:
Exception
-
registerPostQueueDeletionCallback
Register aPostQueueDeletionCallbackto be called after a queue is deleted.- Parameters:
callback- thePostQueueDeletionCallbackto call after a queue is deleted
-
unregisterPostQueueDeletionCallback
Unregister aPostQueueDeletionCallback.- Parameters:
callback- thePostQueueDeletionCallbackto unregister
-
callPostQueueDeletionCallbacks
- Throws:
Exception
-
registerBrokerPlugin
-
unRegisterBrokerPlugin
-
registerBrokerPlugins
-
getBrokerPlugins
List<ActiveMQServerBasePlugin> getBrokerPlugins() -
getBrokerConnectionPlugins
List<ActiveMQServerConnectionPlugin> getBrokerConnectionPlugins() -
getBrokerSessionPlugins
List<ActiveMQServerSessionPlugin> getBrokerSessionPlugins() -
getBrokerConsumerPlugins
List<ActiveMQServerConsumerPlugin> getBrokerConsumerPlugins() -
getBrokerAddressPlugins
List<ActiveMQServerAddressPlugin> getBrokerAddressPlugins() -
getBrokerQueuePlugins
List<ActiveMQServerQueuePlugin> getBrokerQueuePlugins() -
getBrokerBindingPlugins
List<ActiveMQServerBindingPlugin> getBrokerBindingPlugins() -
getBrokerMessagePlugins
List<ActiveMQServerMessagePlugin> getBrokerMessagePlugins() -
getBrokerBridgePlugins
List<ActiveMQServerBridgePlugin> getBrokerBridgePlugins() -
getBrokerCriticalPlugins
List<ActiveMQServerCriticalPlugin> getBrokerCriticalPlugins() -
getBrokerFederationPlugins
List<ActiveMQServerFederationPlugin> getBrokerFederationPlugins() -
getBrokerAMQPFederationPlugins
List<AMQPFederationBrokerPlugin> getBrokerAMQPFederationPlugins() -
getBrokerResourcePlugins
List<ActiveMQServerResourcePlugin> getBrokerResourcePlugins() -
callBrokerPlugins
- Throws:
ActiveMQException
-
callBrokerConnectionPlugins
void callBrokerConnectionPlugins(ActiveMQPluginRunnable<ActiveMQServerConnectionPlugin> pluginRun) throws ActiveMQException - Throws:
ActiveMQException
-
callBrokerSessionPlugins
void callBrokerSessionPlugins(ActiveMQPluginRunnable<ActiveMQServerSessionPlugin> pluginRun) throws ActiveMQException - Throws:
ActiveMQException
-
callBrokerConsumerPlugins
void callBrokerConsumerPlugins(ActiveMQPluginRunnable<ActiveMQServerConsumerPlugin> pluginRun) throws ActiveMQException - Throws:
ActiveMQException
-
callBrokerAddressPlugins
void callBrokerAddressPlugins(ActiveMQPluginRunnable<ActiveMQServerAddressPlugin> pluginRun) throws ActiveMQException - Throws:
ActiveMQException
-
callBrokerQueuePlugins
void callBrokerQueuePlugins(ActiveMQPluginRunnable<ActiveMQServerQueuePlugin> pluginRun) throws ActiveMQException - Throws:
ActiveMQException
-
callBrokerBindingPlugins
void callBrokerBindingPlugins(ActiveMQPluginRunnable<ActiveMQServerBindingPlugin> pluginRun) throws ActiveMQException - Throws:
ActiveMQException
-
callBrokerMessagePlugins
void callBrokerMessagePlugins(ActiveMQPluginRunnable<ActiveMQServerMessagePlugin> pluginRun) throws ActiveMQException - Throws:
ActiveMQException
-
callBrokerMessagePluginsCanAccept
boolean callBrokerMessagePluginsCanAccept(ServerConsumer serverConsumer, MessageReference messageReference) throws ActiveMQException - Throws:
ActiveMQException
-
callBrokerBridgePlugins
void callBrokerBridgePlugins(ActiveMQPluginRunnable<ActiveMQServerBridgePlugin> pluginRun) throws ActiveMQException - Throws:
ActiveMQException
-
callBrokerCriticalPlugins
void callBrokerCriticalPlugins(ActiveMQPluginRunnable<ActiveMQServerCriticalPlugin> pluginRun) throws ActiveMQException - Throws:
ActiveMQException
-
callBrokerFederationPlugins
void callBrokerFederationPlugins(ActiveMQPluginRunnable<ActiveMQServerFederationPlugin> pluginRun) throws ActiveMQException - Throws:
ActiveMQException
-
callBrokerAMQPFederationPlugins
void callBrokerAMQPFederationPlugins(ActiveMQPluginRunnable<AMQPFederationBrokerPlugin> pluginRun) throws ActiveMQException - Throws:
ActiveMQException
-
callBrokerResourcePlugins
void callBrokerResourcePlugins(ActiveMQPluginRunnable<ActiveMQServerResourcePlugin> pluginRun) throws ActiveMQException - Throws:
ActiveMQException
-
hasBrokerPlugins
boolean hasBrokerPlugins() -
hasBrokerConnectionPlugins
boolean hasBrokerConnectionPlugins() -
hasBrokerSessionPlugins
boolean hasBrokerSessionPlugins() -
hasBrokerConsumerPlugins
boolean hasBrokerConsumerPlugins() -
hasBrokerAddressPlugins
boolean hasBrokerAddressPlugins() -
hasBrokerQueuePlugins
boolean hasBrokerQueuePlugins() -
hasBrokerBindingPlugins
boolean hasBrokerBindingPlugins() -
hasBrokerMessagePlugins
boolean hasBrokerMessagePlugins() -
hasBrokerBridgePlugins
boolean hasBrokerBridgePlugins() -
hasBrokerCriticalPlugins
boolean hasBrokerCriticalPlugins() -
hasBrokerFederationPlugins
boolean hasBrokerFederationPlugins() -
hasBrokerAMQPFederationPlugins
boolean hasBrokerAMQPFederationPlugins() -
hasBrokerResourcePlugins
boolean hasBrokerResourcePlugins() -
checkQueueCreationLimit
- Throws:
Exception
-
createSession
ServerSession createSession(String name, String username, String password, int minLargeMessageSize, RemotingConnection remotingConnection, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean xa, String defaultAddress, SessionCallback callback, boolean autoCreateQueues, OperationContext context, Map<SimpleString, RoutingType> prefixes, String securityDomain, String validatedUser, boolean isLegacyProducer) throws Exception- Throws:
Exception
-
createInternalSession
ServerSession createInternalSession(String name, int minLargeMessageSize, RemotingConnection remotingConnection, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, boolean xa, String defaultAddress, SessionCallback callback, boolean autoCreateQueues, OperationContext context, Map<SimpleString, RoutingType> prefixes, String securityDomain, boolean isLegacyProducer) throws ExceptionThis is to be used in places where security is bypassed, like internal sessions, broker connections, etc...- Throws:
Exception
-
isRebuildCounters
boolean isRebuildCounters()should the server rebuild page counters upon startup. this will be useful on testing or an embedded broker scenario -
setRebuildCounters
void setRebuildCounters(boolean rebuildCounters) should the server rebuild page counters upon startup. this will be useful on testing or an embedded broker scenario -
getSecurityStore
SecurityStore getSecurityStore() -
removeSession
- Throws:
Exception
-
getSessions
Set<ServerSession> getSessions() -
getSecurityRepository
HierarchicalRepository<Set<Role>> getSecurityRepository() -
getAddressSettingsRepository
HierarchicalRepository<AddressSettings> getAddressSettingsRepository() -
newOperationContext
OperationContext newOperationContext() -
getConnectionCount
int getConnectionCount() -
getTotalConnectionCount
long getTotalConnectionCount() -
getSessionCount
int getSessionCount() -
getTotalSessionCount
long getTotalSessionCount() -
getTotalMessageCount
long getTotalMessageCount() -
getTotalMessagesAdded
long getTotalMessagesAdded() -
getTotalMessagesAcknowledged
long getTotalMessagesAcknowledged() -
getTotalConsumerCount
long getTotalConsumerCount() -
getPostOffice
PostOffice getPostOffice() -
clearAddressCache
void clearAddressCache() -
getQueueFactory
QueueFactory getQueueFactory() -
getResourceManager
ResourceManager getResourceManager() -
getMetricsManager
MetricsManager getMetricsManager() -
getSessions
-
lookupSession
Returns a session containing the meta-key and meata-value.- Returns:
- a session containing the meta-key and meata-value
-
getClusterManager
ClusterManager getClusterManager() -
getNodeID
SimpleString getNodeID() -
isActive
boolean isActive() -
getUptime
String getUptime() -
getUptimeMillis
long getUptimeMillis() -
isReplicaSync
boolean isReplicaSync()Returns whether the initial replication synchronization process with the backup server is complete; applicable for either the primary or backup server.- Returns:
- whether the initial replication synchronization process with the backup server is complete; applicable for either the primary or backup server
-
waitForActivation
Wait for server initialization.- Returns:
trueif the server was already initialized or if it was initialized within the timeout period,falseotherwise.- Throws:
InterruptedException- See Also:
-
createQueue
@Deprecated Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString user, SimpleString filterString, boolean durable, boolean temporary) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreateAddress) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress, long ringSize) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, boolean autoCreateAddress) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, boolean autoCreateAddress) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean lastValue, boolean autoCreateAddress) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreateAddress) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreateAddress) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(AddressInfo addressInfo, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Boolean lastValue, SimpleString lastValueKey, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean autoCreateAddress, Long ringSize) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean autoCreateAddress) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean lastValue, boolean autoCreateAddress) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(SimpleString address, RoutingType routingType, SimpleString queueName, SimpleString filter, SimpleString user, boolean durable, boolean temporary, boolean ignoreIfExists, boolean transientQueue, boolean autoCreated, int maxConsumers, boolean purgeOnNoConsumers, boolean exclusive, boolean groupRebalance, int groupBuckets, SimpleString groupFirstKey, boolean lastValue, SimpleString lastValueKey, boolean nonDestructive, int consumersBeforeDispatch, long delayBeforeDispatch, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, boolean autoCreateAddress, long ringSize) throws Exception Deprecated.- Throws:
Exception
-
createQueue
@Deprecated Queue createQueue(SimpleString address, SimpleString queueName, SimpleString filter, boolean durable, boolean temporary) throws Exception Deprecated.- Throws:
Exception
-
deployQueue
@Deprecated Queue deployQueue(String address, String queue, String filter, boolean durable, boolean temporary) throws Exception Deprecated.- Throws:
Exception
-
deployQueue
@Deprecated Queue deployQueue(SimpleString address, SimpleString queue, SimpleString filter, boolean durable, boolean temporary) throws Exception Deprecated.- Throws:
Exception
-
createQueue
Overloaded version ofcreateQueue(QueueConfiguration, boolean)where thebooleanparameter is alwaysfalse(i.e. if the queue already exists then an exception will be thrown).- Throws:
Exception- See Also:
-
createQueue
This method creates a queue based on theQueueConfigurationinput. SeeQueueConfigurationfor more details on configuration specifics.Some dynamic defaults will be enforced via address-settings for the corresponding unset properties:
maxConsumersexclusivegroupRebalancegroupBucketsgroupFirstKeylastValuelastValueKeynonDestructiveconsumersBeforeDispatchdelayBeforeDispatchringSizeroutingTypepurgeOnNoConsumersautoCreateAddressautoDelete(only set if queue was auto-created)autoDeleteDelayautoDeleteMessageCount
- Parameters:
queueConfiguration- the configuration to use when creating the queueignoreIfExists- whether to simply return without an exception if the queue exists- Returns:
- the
Queueinstance that was created - Throws:
Exception
-
locateQueue
-
locateQueue
-
locateQueue
- Throws:
Exception
-
bindingQuery
- Throws:
Exception
-
bindingQuery
- Throws:
Exception
-
queueQuery
- Throws:
Exception
-
addressQuery
- Throws:
Exception
-
destroyQueue
- Throws:
Exception
-
destroyQueue
- Throws:
Exception
-
destroyQueue
void destroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount) throws Exception - Throws:
Exception
-
destroyQueue
void destroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers) throws Exception - Throws:
Exception
-
destroyQueue
void destroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean forceAutoDeleteAddress) throws Exception - Throws:
Exception
-
destroyQueue
void destroyQueue(SimpleString queueName, SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, boolean forceAutoDeleteAddress, boolean checkMessageCount) throws Exception - Throws:
Exception
-
destroyConnectionWithSessionMetadata
- Throws:
Exception
-
getScheduledPool
ScheduledExecutorService getScheduledPool() -
getExecutorFactory
ExecutorFactory getExecutorFactory() -
getIOExecutorFactory
ExecutorFactory getIOExecutorFactory() -
setGroupingHandler
-
getGroupingHandler
GroupingHandler getGroupingHandler() -
getReplicationManager
ReplicationManager getReplicationManager() -
getFederationManager
FederationManager getFederationManager() -
deployDivert
- Throws:
Exception
-
updateDivert
- Throws:
Exception
-
destroyDivert
- Throws:
Exception
-
destroyDivert
- Throws:
Exception
-
getConnectorsService
ConnectorsService getConnectorsService() -
deployBridge
- Throws:
Exception
-
destroyBridge
- Throws:
Exception
-
deployFederation
- Throws:
Exception
-
undeployFederation
- Throws:
Exception
-
getSessionByID
-
threadDump
void threadDump() -
registerBrokerConnection
-
unregisterBrokerConnection
Removes the given broker connection from the tracked set of active broker connection entries. Unregistering the connection results in it being forgotten and the caller is responsible for stopping the connection.- Parameters:
brokerConnection- The broker connection that should be forgotten.
-
startBrokerConnection
- Throws:
Exception
-
stopBrokerConnection
- Throws:
Exception
-
getBrokerConnections
Collection<BrokerConnection> getBrokerConnections() -
isAddressBound
Returnstrueif there is a binding for this address (i.e. if there is a created queue).- Returns:
trueif there is a binding for this address (i.e. if there is a created queue)- Throws:
Exception
-
fail
- Throws:
Exception
-
stop
- Throws:
Exception
-
updateQueue
@Deprecated Queue updateQueue(String name, RoutingType routingType, Integer maxConsumers, Boolean purgeOnNoConsumers) throws Exception Deprecated.- Throws:
Exception
-
updateQueue
@Deprecated Queue updateQueue(String name, RoutingType routingType, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive) throws Exception Deprecated.- Throws:
Exception
-
updateQueue
@Deprecated Queue updateQueue(String name, RoutingType routingType, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, String user) throws Exception Deprecated.- Throws:
Exception
-
updateQueue
@Deprecated Queue updateQueue(String name, RoutingType routingType, String filterString, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, String user) throws Exception Deprecated.- Throws:
Exception
-
updateQueue
@Deprecated Queue updateQueue(String name, RoutingType routingType, String filterString, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, String groupFirstQueue, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, String user) throws Exception Deprecated.- Throws:
Exception
-
updateQueue
@Deprecated Queue updateQueue(String name, RoutingType routingType, String filterString, Integer maxConsumers, Boolean purgeOnNoConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, String groupFirstQueue, Boolean nonDestructive, Integer consumersBeforeDispatch, Long delayBeforeDispatch, String user, Long ringSize) throws Exception Deprecated.- Throws:
Exception
-
updateQueue
Update the queue named in theQueueConfigurationwith the corresponding properties. Set only the properties that you wish to change from their existing values. Only the following properties can actually be updated:routingTypefiltermaxConsumerspurgeOnNoConsumersexclusivenonDestructivegroupRebalancegroupFirstKeygroupBucketsconsumersBeforeDispatchdelayBeforeDispatchconfigurationManageduserringSize
- Parameters:
queueConfiguration- theQueueConfigurationto use- Returns:
- the updated
Queueinstance - Throws:
Exception
-
updateQueue
Update a queue's configuration.- Parameters:
queueConfiguration- theQueueConfigurationto useforceUpdate- Iftrue, nonullcheck is performed and unset queueConfiguration values are reset tonull- Returns:
- the updated
Queueinstance - Throws:
Exception- See Also:
-
addProtocolManagerFactory
add a ProtocolManagerFactory to be used. Note ifConfiguration.isResolveProtocols()is true then this factory will replace any factories with the same protocol -
removeProtocolManagerFactory
-
getReloadManager
ReloadManager getReloadManager() -
createBackupServer
-
addScaledDownNode
-
hasScaledDown
-
getActivation
Activation getActivation() -
getHAPolicy
HAPolicy getHAPolicy() -
setHAPolicy
-
setMBeanServer
-
getMBeanServer
MBeanServer getMBeanServer() -
setSecurityManager
-
addExternalComponent
Adding external components is allowed only if the stateisn'tActiveMQServer.SERVER_STATE.STOPPEDorActiveMQServer.SERVER_STATE.STOPPING.It atomically starts the
externalComponentwhile being added ifstart == true.This atomicity is necessary to prevent
ActiveMQComponent.stop()to stop the component right after adding it, but before starting it.- Throws:
IllegalStateException- if the state isActiveMQServer.SERVER_STATE.STOPPEDorActiveMQServer.SERVER_STATE.STOPPINGException
-
getExternalComponents
List<ActiveMQComponent> getExternalComponents() -
addClientConnection
-
removeClientConnection
-
getThreadPool
Executor getThreadPool() -
getAddressInfo
-
updateAddressInfo
Updates anAddressInfoon the broker with the specified routing types.- Parameters:
address- the name of theAddressInfoto updateroutingTypes- the routing types to update theAddressInfowith- Returns:
trueif theAddressInfowas updated,falseotherwise- Throws:
Exception
-
updateAddressInfo
@Deprecated boolean updateAddressInfo(SimpleString address, Collection<RoutingType> routingTypes) throws Exception Deprecated.- Throws:
Exception
-
addAddressInfo
Add theAddressInfoto the broker- Parameters:
addressInfo- theAddressInfoto add- Returns:
trueif theAddressInfowas added,falseotherwise- Throws:
Exception
-
addOrUpdateAddressInfo
A convenience method to combine the functionality ofaddAddressInfoandupdateAddressInfo. It will add theAddressInfoobject to the broker if it doesn't exist or update it if it does.- Parameters:
addressInfo- theAddressInfoto add or the info used to update the existingAddressInfo- Returns:
- the resulting
AddressInfo - Throws:
Exception
-
removeAddressInfo
Remove anAddressInfofrom the broker.- Parameters:
address- theAddressInfoto removeauth- authorization information;nullis valid- Throws:
Exception
-
autoRemoveAddressInfo
Remove anAddressInfofrom the broker.- Parameters:
address- theAddressInfoto removeauth- authorization information;nullis valid- Throws:
Exception
-
registerQueueOnManagement
- Throws:
Exception
-
removeAddressInfo
Remove anAddressInfofrom the broker.- Parameters:
address- theAddressInfoto removeauth- authorization information;nullis validforce- It will disconnect everything from the address including queues and consumers- Throws:
Exception
-
getInternalNamingPrefix
String getInternalNamingPrefix() -
getDiskStoreUsage
double getDiskStoreUsage() -
reloadConfigurationFile
- Throws:
Exception
-
getConnectionRouterManager
ConnectionRouterManager getConnectionRouterManager() -
validateUser
String validateUser(String username, String password, RemotingConnection connection, String securityDomain) throws Exception - Throws:
Exception
-
setProperties
-
getStatus
-
registerRecordsLoader
-
getMirrorRegistry
MirrorRegistry getMirrorRegistry() -
getPendingMirrorAcks
int getPendingMirrorAcks()
-