in artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java [439:1244]
Configuration addDiscoveryGroupConfiguration(String key,
DiscoveryGroupConfiguration discoveryGroupConfiguration);
/**
* {@return the grouping handler configured for this server}
*/
GroupingHandlerConfiguration getGroupingHandlerConfiguration();
/**
* Sets the grouping handler configured for this server.
*/
Configuration setGroupingHandlerConfiguration(GroupingHandlerConfiguration groupingHandlerConfiguration);
/**
* {@return the bridges configured for this server}
*/
List<BridgeConfiguration> getBridgeConfigurations();
/**
* Sets the bridges configured for this server.
*/
Configuration setBridgeConfigurations(List<BridgeConfiguration> configs);
/**
* {@return the diverts configured for this server}
*/
List<DivertConfiguration> getDivertConfigurations();
/**
* Sets the diverts configured for this server.
*/
Configuration setDivertConfigurations(List<DivertConfiguration> configs);
Configuration addDivertConfiguration(DivertConfiguration config);
/**
* {@return the redirects configured for this server}
*/
List<ConnectionRouterConfiguration> getConnectionRouters();
/**
* Sets the redirects configured for this server.
*/
Configuration setConnectionRouters(List<ConnectionRouterConfiguration> configs);
Configuration addConnectionRouter(ConnectionRouterConfiguration config);
/**
* {@return the cluster connections configured for this server; modifying the returned list will modify the list of
* {@link ClusterConnectionConfiguration} used by this configuration}
*/
List<ClusterConnectionConfiguration> getClusterConfigurations();
/**
* Sets the cluster connections configured for this server.
*/
Configuration setClusterConfigurations(List<ClusterConnectionConfiguration> configs);
Configuration addClusterConfiguration(ClusterConnectionConfiguration config);
ClusterConnectionConfiguration addClusterConfiguration(String name, String uri) throws Exception;
Configuration clearClusterConfigurations();
Configuration addAMQPConnection(AMQPBrokerConnectConfiguration amqpBrokerConnectConfiguration);
List<AMQPBrokerConnectConfiguration> getAMQPConnection();
/**
* Quick set of all AMQP connection configurations in one call which will clear all previously set or added broker
* configurations.
*
* @param amqpConnectionConfiugrations A list of AMQP broker connection configurations to assign to the broker.
* @return this configuration object
*/
Configuration setAMQPConnectionConfigurations(List<AMQPBrokerConnectConfiguration> amqpConnectionConfiugrations);
/**
* Clears the current configuration object of all set or added AMQP connection configuration elements.
*
* @return this configuration object
*/
Configuration clearAMQPConnectionConfigurations();
/**
* {@return the queues configured for this server}
*/
@Deprecated
List<CoreQueueConfiguration> getQueueConfigurations();
/**
* {@return the queues configured for this server; modifying the returned {@code List} will not impact the underlying
* {@code List}}
*/
List<QueueConfiguration> getQueueConfigs();
/**
* Sets the queues configured for this server.
*/
@Deprecated
Configuration setQueueConfigurations(List<CoreQueueConfiguration> configs);
/**
* Sets the queues configured for this server.
*/
Configuration setQueueConfigs(List<QueueConfiguration> configs);
@Deprecated
Configuration addQueueConfiguration(CoreQueueConfiguration config);
Configuration addQueueConfiguration(QueueConfiguration config);
/**
* {@return the addresses configured for this server}
*/
List<CoreAddressConfiguration> getAddressConfigurations();
/**
* Sets the addresses configured for this server.
*/
Configuration setAddressConfigurations(List<CoreAddressConfiguration> configs);
/**
* Adds an addresses configuration
*/
Configuration addAddressConfiguration(CoreAddressConfiguration config);
/**
* {@return the management address of this server; Clients can send management messages to this address to manage
* this server; default is {@link ActiveMQDefaultConfiguration#DEFAULT_MANAGEMENT_ADDRESS}}
*/
SimpleString getManagementAddress();
/**
* Sets the management address of this server.
*/
Configuration setManagementAddress(SimpleString address);
/**
* {@return the management notification address of this server; Clients can bind queues to this address to receive
* management notifications emitted by this server; default is
* {@link ActiveMQDefaultConfiguration#DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS}}
*/
SimpleString getManagementNotificationAddress();
/**
* Sets the management notification address of this server.
*/
Configuration setManagementNotificationAddress(SimpleString address);
/**
* {@return the cluster user for this server; default is {@link ActiveMQDefaultConfiguration#DEFAULT_CLUSTER_USER}}
*/
String getClusterUser();
/**
* Sets the cluster user for this server.
*/
Configuration setClusterUser(String user);
/**
* {@return the cluster password for this server; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_CLUSTER_PASSWORD}}
*/
String getClusterPassword();
/**
* Sets the cluster password for this server.
*/
Configuration setClusterPassword(String password);
/**
* {@return the size of the cache for pre-creating message IDs; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_ID_CACHE_SIZE}}
*/
int getIDCacheSize();
/**
* Sets the size of the cache for pre-creating message IDs.
*/
Configuration setIDCacheSize(int idCacheSize);
/**
* {@return whether message ID cache is persisted; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_PERSIST_ID_CACHE}}
*/
boolean isPersistIDCache();
/**
* Sets whether message ID cache is persisted.
*/
Configuration setPersistIDCache(boolean persist);
// Journal related attributes ------------------------------------------------------------
/**
* {@return the file system directory used to store bindings; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_BINDINGS_DIRECTORY}}
*/
String getBindingsDirectory();
/**
* The binding location related to artemis.instance.
*/
File getBindingsLocation();
/**
* Sets the file system directory used to store bindings.
*/
Configuration setBindingsDirectory(String dir);
/**
* {@return the max number of concurrent reads allowed on paging; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_MAX_CONCURRENT_PAGE_IO}}
*/
int getPageMaxConcurrentIO();
/**
* The max number of concurrent reads allowed on paging.
* <p>
* Default = 5
*/
Configuration setPageMaxConcurrentIO(int maxIO);
/**
* {@return whether the whole page is read while getting message after page cache is evicted; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_READ_WHOLE_PAGE}}
*/
boolean isReadWholePage();
/**
* Sets whether the whole page is read while getting message after page cache is evicted.
*/
Configuration setReadWholePage(boolean read);
/**
* {@return the file system directory used to store journal log; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_DIR}}
*/
String getJournalDirectory();
/**
* {@return the location of the journal related to {@code artemis.instance}}
*/
File getJournalLocation();
/**
* {@return the location of the node manager lock file related to artemis.instance}
*/
File getNodeManagerLockLocation();
/**
* Sets the file system directory used to store the node manager lock file.
*/
Configuration setNodeManagerLockDirectory(String dir);
/**
* {@return the directory that contains the lock file}
*/
String getNodeManagerLockDirectory();
/**
* Sets the file system directory used to store journal log.
*/
Configuration setJournalDirectory(String dir);
String getJournalRetentionDirectory();
/**
* Sets the file system directory used to store historical backup journal.
*/
Configuration setJournalRetentionDirectory(String dir);
File getJournalRetentionLocation();
/**
* {@return the retention period for the journal in milliseconds (always in milliseconds, a conversion is performed
* on set)}
*/
long getJournalRetentionPeriod();
Configuration setJournalRetentionPeriod(TimeUnit unit, long limit);
long getJournalRetentionMaxBytes();
Configuration setJournalRetentionMaxBytes(long bytes);
/**
* {@return the type of journal used by this server ({@code NIO}, {@code ASYNCIO} or {@code MAPPED}); default is
* {@code ASYNCIO}}
*/
JournalType getJournalType();
/**
* Sets the type of journal used by this server (either {@code NIO} or {@code ASYNCIO}).
*/
Configuration setJournalType(JournalType type);
/**
* {@return whether the journal is synchronized when receiving transactional data; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_SYNC_TRANSACTIONAL}}
*/
boolean isJournalSyncTransactional();
/**
* Sets whether the journal is synchronized when receiving transactional data.
*/
Configuration setJournalSyncTransactional(boolean sync);
/**
* {@return whether the journal is synchronized when receiving non-transactional data; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL}}
*/
boolean isJournalSyncNonTransactional();
/**
* Sets whether the journal is synchronized when receiving non-transactional data.
*/
Configuration setJournalSyncNonTransactional(boolean sync);
/**
* {@return the size (in bytes) of each journal files; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_FILE_SIZE}}
*/
int getJournalFileSize();
/**
* Sets the size (in bytes) of each journal files.
*/
Configuration setJournalFileSize(int size);
/**
* {@return the minimal number of journal files before compacting; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_COMPACT_MIN_FILES}}
*/
int getJournalCompactMinFiles();
/**
* Sets the minimal number of journal files before compacting.
*/
Configuration setJournalCompactMinFiles(int minFiles);
/**
* Number of files that would be acceptable to keep on a pool; default is
* {@link ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_POOL_FILES}}
*/
int getJournalPoolFiles();
/**
* Number of files that would be acceptable to keep on a pool; default is
* {@link ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_POOL_FILES}}
*/
Configuration setJournalPoolFiles(int poolSize);
/**
* {@return the percentage of live data before compacting the journal; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_COMPACT_PERCENTAGE}}
*/
int getJournalCompactPercentage();
/**
* {@return How long to wait when opening a new Journal file before failing}
*/
int getJournalFileOpenTimeout();
/**
* Sets the journal file open timeout
*/
Configuration setJournalFileOpenTimeout(int journalFileOpenTimeout);
/**
* Sets the percentage of live data before compacting the journal.
*/
Configuration setJournalCompactPercentage(int percentage);
/**
* {@return the number of journal files to pre-create; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_MIN_FILES}}
*/
int getJournalMinFiles();
/**
* Sets the number of journal files to pre-create.
*/
Configuration setJournalMinFiles(int files);
// AIO and NIO need different values for these params
/**
* {@return the maximum number of write requests that can be in the AIO queue at any given time; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_MAX_IO_AIO}}
*/
int getJournalMaxIO_AIO();
/**
* Sets the maximum number of write requests that can be in the AIO queue at any given time.
*/
Configuration setJournalMaxIO_AIO(int journalMaxIO);
/**
* {@return the timeout (in nanoseconds) used to flush buffers in the AIO queue; default is {@link
* org.apache.activemq.artemis.ArtemisConstants#DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO}}
*/
int getJournalBufferTimeout_AIO();
/**
* Sets the timeout (in nanoseconds) used to flush buffers in the AIO queue.
*/
Configuration setJournalBufferTimeout_AIO(int journalBufferTimeout);
/**
* This is the device block size used on writing. This is usually translated as st_blksize from fstat. Returning
* {@code null} means the system should instead make a call on fstat and use st_blksize. The intention of this
* setting was to bypass the value in certain devices that will return a huge number as their block size (e.g.
* CephFS)
*/
Integer getJournalDeviceBlockSize();
/**
* Set the journal device block size.
*
* @see #getJournalDeviceBlockSize()
*/
Configuration setJournalDeviceBlockSize(Integer deviceBlockSize);
/**
* {@return the buffer size (in bytes) for AIO; default is {@link
* org.apache.activemq.artemis.ArtemisConstants#DEFAULT_JOURNAL_BUFFER_SIZE_AIO}}
*/
int getJournalBufferSize_AIO();
/**
* Sets the buffer size (in bytes) for AIO.
*/
Configuration setJournalBufferSize_AIO(int journalBufferSize);
/**
* {@return the maximum number of write requests for NIO journal; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_MAX_IO_NIO}}
*/
int getJournalMaxIO_NIO();
/**
* Sets the maximum number of write requests for NIO journal.
*/
Configuration setJournalMaxIO_NIO(int journalMaxIO);
/**
* {@return the timeout (in nanoseconds) used to flush buffers in the NIO; default is {@link
* org.apache.activemq.artemis.ArtemisConstants#DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO}}
*/
int getJournalBufferTimeout_NIO();
/**
* Sets the timeout (in nanoseconds) used to flush buffers in the NIO.
*/
Configuration setJournalBufferTimeout_NIO(int journalBufferTimeout);
/**
* {@return the buffer size (in bytes) for NIO; default is {@link
* org.apache.activemq.artemis.ArtemisConstants#DEFAULT_JOURNAL_BUFFER_SIZE_NIO}}
*/
int getJournalBufferSize_NIO();
/**
* Sets the buffer size (in bytes) for NIO.
*/
Configuration setJournalBufferSize_NIO(int journalBufferSize);
/**
* {@return the maximal number of data files before we can start deleting corrupted files instead of moving them to
* attic; default value is {@link ActiveMQDefaultConfiguration#DEFAULT_JOURNAL_MAX_ATTIC_FILES}}
*/
int getJournalMaxAtticFiles();
/**
* Sets the maximal number of data files before we can start deleting corrupted files instead of moving them to
* attic.
*/
Configuration setJournalMaxAtticFiles(int maxAtticFiles);
/**
* {@return whether the bindings directory is created on this server startup; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_CREATE_BINDINGS_DIR}}
*/
boolean isCreateBindingsDir();
/**
* Sets whether the bindings directory is created on this server startup.
*/
Configuration setCreateBindingsDir(boolean create);
/**
* {@return whether the journal directory is created on this server startup; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_CREATE_JOURNAL_DIR}}
*/
boolean isCreateJournalDir();
/**
* Sets whether the journal directory is created on this server startup.
*/
Configuration setCreateJournalDir(boolean create);
// Undocumented attributes
boolean isLogJournalWriteRate();
Configuration setLogJournalWriteRate(boolean rate);
long getServerDumpInterval();
Configuration setServerDumpInterval(long interval);
int getMemoryWarningThreshold();
Configuration setMemoryWarningThreshold(int memoryWarningThreshold);
long getMemoryMeasureInterval();
Configuration setMemoryMeasureInterval(long memoryMeasureInterval);
// Paging Properties --------------------------------------------------------------------
/**
* {@return the file system directory used to store paging files; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_PAGING_DIR}}
*/
String getPagingDirectory();
/**
* Sets the file system directory used to store paging files.
*/
Configuration setPagingDirectory(String dir);
/**
* The paging location related to artemis.instance
*/
File getPagingLocation();
// Large Messages Properties ------------------------------------------------------------
/**
* {@return the file system directory used to store large messages; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_LARGE_MESSAGES_DIR}}
*/
String getLargeMessagesDirectory();
/**
* The large message location related to artemis.instance
*/
File getLargeMessagesLocation();
/**
* Sets the file system directory used to store large messages.
*/
Configuration setLargeMessagesDirectory(String directory);
// Other Properties ---------------------------------------------------------------------
/**
* {@return whether wildcard routing is supported by this server; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_WILDCARD_ROUTING_ENABLED}}
*/
boolean isWildcardRoutingEnabled();
/**
* Sets whether wildcard routing is supported by this server.
*/
Configuration setWildcardRoutingEnabled(boolean enabled);
WildcardConfiguration getWildcardConfiguration();
Configuration setWildCardConfiguration(WildcardConfiguration wildcardConfiguration);
/**
* {@return the timeout (in milliseconds) after which transactions is removed from the resource manager after it was
* created; default is {@link ActiveMQDefaultConfiguration#DEFAULT_TRANSACTION_TIMEOUT}}
*/
long getTransactionTimeout();
/**
* Sets the timeout (in milliseconds) after which transactions is removed from the resource manager after it was
* created.
*/
Configuration setTransactionTimeout(long timeout);
/**
* {@return whether message counter is enabled for this server; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_MESSAGE_COUNTER_ENABLED}}
*/
boolean isMessageCounterEnabled();
/**
* Sets whether message counter is enabled for this server.
*/
Configuration setMessageCounterEnabled(boolean enabled);
/**
* {@return the sample period (in milliseconds) to take message counter snapshot; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_MESSAGE_COUNTER_SAMPLE_PERIOD}}
*/
long getMessageCounterSamplePeriod();
/**
* Sets the sample period to take message counter snapshot.
*
* @param period value must be greater than 1000ms
*/
Configuration setMessageCounterSamplePeriod(long period);
/**
* {@return the maximum number of days kept in memory for message counter; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_MESSAGE_COUNTER_MAX_DAY_HISTORY}}
*/
int getMessageCounterMaxDayHistory();
/**
* Sets the maximum number of days kept in memory for message counter.
*
* @param maxDayHistory value must be greater than 0
*/
Configuration setMessageCounterMaxDayHistory(int maxDayHistory);
/**
* {@return the frequency (in milliseconds) to scan transactions to detect which transactions have timed out; default
* is {@link ActiveMQDefaultConfiguration#DEFAULT_TRANSACTION_TIMEOUT_SCAN_PERIOD}}
*/
long getTransactionTimeoutScanPeriod();
/**
* Sets the frequency (in milliseconds) to scan transactions to detect which transactions have timed out.
*/
Configuration setTransactionTimeoutScanPeriod(long period);
/**
* {@return the frequency (in milliseconds) to scan messages to detect which messages have expired; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_MESSAGE_EXPIRY_SCAN_PERIOD}}
*/
long getMessageExpiryScanPeriod();
/**
* Sets the frequency (in milliseconds) to scan messages to detect which messages have expired.
*/
Configuration setMessageExpiryScanPeriod(long messageExpiryScanPeriod);
/**
* {@return the priority of the thread used to scan message expiration; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_MESSAGE_EXPIRY_THREAD_PRIORITY}}
*/
@Deprecated
int getMessageExpiryThreadPriority();
/**
* Sets the priority of the thread used to scan message expiration.
*/
@Deprecated
Configuration setMessageExpiryThreadPriority(int messageExpiryThreadPriority);
/**
* {@return the frequency (in milliseconds) to scan addresses and queues to detect which ones should be deleted;
* default is {@link ActiveMQDefaultConfiguration#DEFAULT_MESSAGE_EXPIRY_SCAN_PERIOD}}
*/
long getAddressQueueScanPeriod();
/**
* Sets the frequency (in milliseconds) to scan addresses and queues to detect which ones should be deleted.
*/
Configuration setAddressQueueScanPeriod(long addressQueueScanPeriod);
/**
* {@return A list of AddressSettings per matching to be deployed to the address settings repository}
*/
Map<String, AddressSettings> getAddressSettings();
/**
* Set the collection of {@code AddressSettings} indexed by address match.
*
* @param addressSettings list of AddressSettings per matching to be deployed to the address settings repository
*/
Configuration setAddressSettings(Map<String, AddressSettings> addressSettings);
/**
* Add an {@code AddressSettings} to the underlying collection.
*
* @param key the address match
* @param addressesSetting the {@code AddressSettings} to add
*/
Configuration addAddressSetting(String key, AddressSettings addressesSetting);
Configuration clearAddressSettings();
@Deprecated
Map<String, AddressSettings> getAddressesSettings();
@Deprecated
Configuration setAddressesSettings(Map<String, AddressSettings> addressesSettings);
@Deprecated
Configuration addAddressesSetting(String key, AddressSettings addressesSetting);
@Deprecated
Configuration clearAddressesSettings();
/**
* Set the collection of {@code Role} objects indexed by match (i.e. address name).
*
* @param roles a list of roles per matching
*/
Configuration setSecurityRoles(Map<String, Set<Role>> roles);
/**
* {@return a collection of roles indexed by matched}
*/
Map<String, Set<Role>> getSecurityRoles();
Configuration addSecurityRoleNameMapping(String internalRole, Set<String> externalRoles);
Map<String, Set<String>> getSecurityRoleNameMappings();
Configuration putSecurityRoles(String match, Set<Role> roles);
Configuration setConnectorServiceConfigurations(List<ConnectorServiceConfiguration> configs);
Configuration addConnectorServiceConfiguration(ConnectorServiceConfiguration config);
Configuration setSecuritySettingPlugins(List<SecuritySettingPlugin> plugins);
Configuration addSecuritySettingPlugin(SecuritySettingPlugin plugin);
@Deprecated
Configuration setMetricsPlugin(ActiveMQMetricsPlugin plugin);
Configuration setMetricsConfiguration(MetricsConfiguration metricsConfiguration);
/**
* {@return list of {@link ConnectorServiceConfiguration}}
*/
List<ConnectorServiceConfiguration> getConnectorServiceConfigurations();
List<SecuritySettingPlugin> getSecuritySettingPlugins();
@Deprecated
ActiveMQMetricsPlugin getMetricsPlugin();
MetricsConfiguration getMetricsConfiguration();
/**
* The default password decoder
*/
Configuration setPasswordCodec(String codec);
/**
* Gets the default password decoder
*/
String getPasswordCodec();
/**
* Sets if passwords should be masked or not. True means the passwords should be masked.
*/
Configuration setMaskPassword(Boolean maskPassword);
/**
* If passwords are masked. True means the passwords are masked.
*/
Boolean isMaskPassword();
/**
* Whether to use all protocols available on the classpath. If false only the core protocol will be set, any other
* protocols will need to be set directly on the ActiveMQServer
*/
Configuration setResolveProtocols(boolean resolveProtocols);
TransportConfiguration[] getTransportConfigurations(String... connectorNames);
TransportConfiguration[] getTransportConfigurations(List<String> connectorNames);
/**
* {@return whether to resolve and use any Protocols available on the classpath; default is {@link
* ActiveMQDefaultConfiguration#DEFAULT_RESOLVE_PROTOCOLS}} {@see #setResolveProtocols()}
*/
boolean isResolveProtocols();
Configuration copy() throws Exception;
Configuration setJournalLockAcquisitionTimeout(long journalLockAcquisitionTimeout);
long getJournalLockAcquisitionTimeout();
HAPolicyConfiguration getHAPolicyConfiguration();
Configuration setHAPolicyConfiguration(HAPolicyConfiguration haPolicyConfiguration);
/**
* Set the Artemis instance relative folder for data and stuff.
*/
void setBrokerInstance(File directory);
/**
* Set the Artemis instance relative folder for data and stuff.
*/
File getBrokerInstance();
default boolean isJDBC() {
StoreConfiguration configuration = getStoreConfiguration();
return (configuration != null && configuration.getStoreType() == StoreConfiguration.StoreType.DATABASE);
}