@ConfigurationProperties(prefix="axon.axonserver") public class AxonServerConfiguration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AxonServerConfiguration.Builder |
static class |
AxonServerConfiguration.Eventhandling |
static class |
AxonServerConfiguration.EventStoreConfiguration |
static class |
AxonServerConfiguration.FlowControlConfiguration
Configuration class for Flow Control of specific message types.
|
static class |
AxonServerConfiguration.HeartbeatConfiguration |
static class |
AxonServerConfiguration.PersistentStreamSettings |
Constructor and Description |
---|
AxonServerConfiguration()
Instantiate a default
AxonServerConfiguration . |
Modifier and Type | Method and Description |
---|---|
static AxonServerConfiguration.Builder |
builder()
Instantiate a
AxonServerConfiguration.Builder to create an AxonServerConfiguration . |
String |
getCertFile()
The path to the certificate file used for SSL.
|
String |
getClientId()
The client identifier as it registers itself to Axon Server, must be unique.
|
AxonServerConfiguration.FlowControlConfiguration |
getCommandFlowControl()
Specific
flow control settings for the command message stream. |
int |
getCommandLoadFactor()
An
int representing the fixed value of load factor sent to Axon Server for any command's subscription if
no specific implementation of CommandLoadFactorProvider is configured. |
int |
getCommandThreads()
The number of threads executing commands.
|
int |
getCommitTimeout()
The timeout (in milliseconds) to wait for response on commit.
|
String |
getComponentName()
The name of this application.
|
int |
getConnectionManagementThreadPoolSize()
The number of threads that should be used for connection management activities by the
AxonServerConnectionFactory used by the AxonServerConnectionManager . |
long |
getConnectTimeout()
A value representing the maximum time in milliseconds a request for the initial Axon Server connection may last.
|
String |
getContext()
The bounded
context that this application operates in. |
AxonServerConfiguration.FlowControlConfiguration |
getDefaultFlowControlConfiguration()
The default
flow control settings used when no specific
command , event , or
query flow control settings are provided. |
EventCipher |
getEventCipher()
Deprecated.
Through use of the Axon Server Java
Connector project.
|
AxonServerConfiguration.FlowControlConfiguration |
getEventFlowControl()
Specific flow control settings for the event message stream.
|
AxonServerConfiguration.Eventhandling |
getEventhandling()
Return the configured
AxonServerConfiguration.Eventhandling of this application for Axon Server. |
AxonServerConfiguration.EventStoreConfiguration |
getEventStoreConfiguration()
Return the configured
AxonServerConfiguration.EventStoreConfiguration of this application for Axon Server. |
AxonServerConfiguration.HeartbeatConfiguration |
getHeartbeat()
The configuration specifics on sending heartbeat messages to ensure a fully operational end-to-end connection
with Axon Server.
|
Integer |
getInitialNrOfPermits()
Deprecated.
In favor of
getPermits() |
long |
getKeepAliveTime()
The interval (in ms) for keep alive requests, 0 is keep-alive disabled.
|
long |
getKeepAliveTimeout()
The timeout (in ms) for keep alive requests.
|
int |
getMaxGrpcBufferedMessages()
Deprecated.
This property is no longer used through adjustments in the Axon Server Java Connector project.
|
int |
getMaxMessageSize()
The gRPC max inbound message size.
|
Integer |
getNewPermitsThreshold()
The threshold at which the application sends new permits to server.
|
Integer |
getNrOfNewPermits()
Additional number of permits send for message streams (events, commands, queries) when application is ready for
more messages.
|
Integer |
getPermits()
The initial number of permits send for message streams (events, commands, queries).
|
Map<String,AxonServerConfiguration.PersistentStreamSettings> |
getPersistentStreams()
Returns the settings for each of the configured persistent streams, by name.
|
int |
getProcessorsNotificationInitialDelay()
The initial delay (in ms.) before application sends first status update on event processors to Axon Server.
|
int |
getProcessorsNotificationRate()
The interval (in ms.) application sends status updates on event processors to Axon Server.
|
AxonServerConfiguration.FlowControlConfiguration |
getQueryFlowControl()
Specific
flow control settings for the query message stream. |
int |
getQueryThreads()
The number of threads executing queries.
|
long |
getReconnectInterval()
The amount of time in milliseconds to wait in between attempts to connect to Axon Server.
|
String |
getServers()
Comma separated list of Axon Server servers.
|
int |
getSnapshotPrefetch()
An
int indicating the maximum number of Aggregate snapshots which will be retrieved. |
boolean |
getSuppressDownloadMessage()
Deprecated.
Through use of the Axon Server Java
Connector project, which enables the download message in absence of configured servers.
|
String |
getToken()
The token providing access control with Axon Server.\
|
boolean |
isDisableEventBlacklisting()
Deprecated.
In favor of
setEventBlockListingEnabled(boolean) . |
boolean |
isEnabled()
Whether (automatic) configuration of the Axon Server Connector is enabled.
|
boolean |
isEventBlockListingEnabled()
Flag that allows block-listing of event types to be enabled.
|
boolean |
isForceReadFromLeader()
Indicates whether it is OK to query events from the local Axon Server node - the node the client is currently
connected to.
|
boolean |
isForceReconnectThroughServers()
Indicates whether the
AxonServerConnectionManager should always reconnect through the
servers or try to reconnect with the server it just lost the connection with. |
boolean |
isShortcutQueriesToLocalHandlers() |
boolean |
isSslEnabled()
A toggle dictating whether to use TLS for the connection to Axon Server.\
|
List<io.axoniq.axonserver.grpc.control.NodeInfo> |
routingServers()
Deprecated.
In favor of the
AxonServerConnectionManager itself being in charge of parsing the
getServers() list into a NodeInfo collection. |
void |
setCertFile(String certFile)
Sets the path to the certificate file used for SSL.
|
void |
setClientId(String clientId)
Sets the client identifier as it registers itself to Axon Server, must be unique.
|
void |
setCommandFlowControl(AxonServerConfiguration.FlowControlConfiguration commandFlowControl)
Sets specific
flow control settings for the command message stream. |
void |
setCommandLoadFactor(int commandLoadFactor)
Sets an
int representing the fixed value of load factor sent to Axon Server for any command's
subscription if no specific implementation of CommandLoadFactorProvider is configured. |
void |
setCommandThreads(int commandThreads)
Sets the number of threads executing commands.
|
void |
setCommitTimeout(int commitTimeout)
Sets the timeout (in milliseconds) to wait for response on commit.
|
void |
setComponentName(String componentName)
Sets the name of this application.
|
void |
setConnectionManagementThreadPoolSize(int connectionManagementThreadPoolSize)
Define the number of threads that should be used for connection management activities by the
AxonServerConnectionFactory used by the AxonServerConnectionManager . |
void |
setConnectTimeout(long connectTimeout)
Sets the value representing the maximum time in milliseconds a request for the initial Axon Server connection may
last.
|
void |
setContext(String context)
Sets the bounded
context that this application operates in. |
void |
setDisableEventBlacklisting(boolean disableEventBlacklisting)
Deprecated.
In favor of
setEventBlockListingEnabled(boolean) . |
void |
setEnabled(boolean enabled)
Set whether (automatic) configuration of the Axon Server Connector is enabled.
|
void |
setEventBlockListingEnabled(boolean eventBlockListingEnabled)
Sets flag that allows block-listing of event types to be enabled.
|
void |
setEventFlowControl(AxonServerConfiguration.FlowControlConfiguration eventFlowControl)
Sets specific
flow control settings for the event message stream. |
void |
setEventhandling(AxonServerConfiguration.Eventhandling eventhandling)
Set the
AxonServerConfiguration.Eventhandling of this application for Axon Server |
void |
setEventStoreConfiguration(AxonServerConfiguration.EventStoreConfiguration eventStoreConfiguration)
Set the
AxonServerConfiguration.EventStoreConfiguration of this application for Axon Server |
void |
setForceReadFromLeader(boolean forceReadFromLeader)
Sets the indicator whether it is OK to query events from the local Axon Server node - the node the client is
currently connected to.
|
void |
setForceReconnectThroughServers(boolean forceReconnectThroughServers)
Sets the indicator whether the
AxonServerConnectionManager should always reconnect through the
servers or try to reconnect with the server it just lost the connection with. |
void |
setHeartbeat(AxonServerConfiguration.HeartbeatConfiguration heartbeat)
Sets the configuration specifics on sending heartbeat messages to ensure a fully operational end-to-end
connection with Axon Server.
|
void |
setInitialNrOfPermits(Integer initialNrOfPermits)
Deprecated.
In favor of
setPermits(Integer) |
void |
setKeepAliveTime(long keepAliveTime)
Sets the interval (in ms) for keep alive requests, 0 is keep-alive disabled.
|
void |
setKeepAliveTimeout(long keepAliveTimeout)
Sets the timeout (in ms) for keep alive requests.
|
void |
setMaxGrpcBufferedMessages(int maxGrpcBufferedMessages)
Deprecated.
This property is no longer used through adjustments in the Axon Server Java Connector project.
|
void |
setMaxMessageSize(int maxMessageSize)
Sets the gRPC max inbound message size.
|
void |
setNewPermitsThreshold(Integer newPermitsThreshold)
Sets the threshold at which the application sends new permits to server.
|
void |
setNrOfNewPermits(Integer nrOfNewPermits)
Sets the additional number of permits send for message streams (events, commands, queries) when application is
ready for more messages.
|
void |
setPermits(Integer permits)
Sets the initial number of permits send for message streams (events, commands, queries).
|
void |
setProcessorsNotificationInitialDelay(int processorsNotificationInitialDelay)
Sets the initial delay (in ms.) before application sends first status update on event processors to Axon Server.
|
void |
setProcessorsNotificationRate(int processorsNotificationRate)
Sets the interval (in ms.) application sends status updates on event processors to Axon Server.
|
void |
setQueryFlowControl(AxonServerConfiguration.FlowControlConfiguration queryFlowControl)
Sets specific
flow control settings for the query message stream. |
void |
setQueryThreads(int queryThreads)
Sets the number of threads executing queries.
|
void |
setReconnectInterval(long reconnectInterval)
Sets the amount of time in milliseconds to wait in between attempts to connect to Axon Server.
|
void |
setServers(String routingServers)
Set the comma separated list of Axon Server servers.
|
void |
setShortcutQueriesToLocalHandlers(boolean shortcutQueriesToLocalHandlers) |
void |
setSnapshotPrefetch(int snapshotPrefetch)
Sets the maximum number of Aggregate snapshots which will be retrieved.
|
void |
setSslEnabled(boolean sslEnabled)
Defines whether to use TLS for the connection to Axon Server.
|
void |
setSuppressDownloadMessage(boolean suppressDownloadMessage)
Deprecated.
Through use of the Axon Server Java
Connector project, which enables the download message in absence of configured servers.
|
void |
setToken(String token)
Sets the token providing access control with Axon Server.
|
public AxonServerConfiguration()
AxonServerConfiguration
.public static AxonServerConfiguration.Builder builder()
AxonServerConfiguration.Builder
to create an AxonServerConfiguration
.AxonServerConfiguration.Builder
to be able to create an AxonServerConfiguration
.public boolean isEnabled()
false
, the connector will
not be implicitly be configured. Defaults to true
.
Note that this setting will only affect automatic configuration by Application Containers (such as Spring).
public boolean isShortcutQueriesToLocalHandlers()
public void setShortcutQueriesToLocalHandlers(boolean shortcutQueriesToLocalHandlers)
public void setEnabled(boolean enabled)
false
, the connector
will not be implicitly be configured. Defaults to true
.
Note that this setting will only affect automatic configuration by Application Containers (such as Spring).
enabled
- Whether (automatic) configuration of the Axon Server Connector is enabled.public String getServers()
@Deprecated public List<io.axoniq.axonserver.grpc.control.NodeInfo> routingServers()
AxonServerConnectionManager
itself being in charge of parsing the
getServers()
list into a NodeInfo
collection.NodeInfo
instances based on the comma separated list of getServers()
.NodeInfo
instances based on the comma separated list of getServers()
.public void setServers(String routingServers)
routingServers
- The comma separated list of Axon Server servers to connect with.public String getClientId()
public void setClientId(String clientId)
clientId
- The client identifier as it registers itself to Axon Server, must be unique.public String getComponentName()
client identifier
. Defaults to spring.application.name
when not defined, and to Unnamed + client identifier
when spring.application.name
isn't set.public void setComponentName(String componentName)
client identifier
. Defaults to
spring.application.name
when not defined, and to Unnamed + client identifier
when
spring.application.name
isn't set.componentName
- The name of this application.public String getToken()
public void setToken(String token)
token
- The token providing access control with Axon Server.public String getContext()
context
that this application operates in. Defaults to "default"
.context
that this application operates in.public void setContext(String context)
context
that this application operates in. Defaults to "default"
.context
- The bounded context
that this application operates in.public String getCertFile()
SSL is enabled.
public void setCertFile(String certFile)
SSL is enabled.
certFile
- The path to the certificate file used for SSL.public boolean isSslEnabled()
public void setSslEnabled(boolean sslEnabled)
sslEnabled
- The toggle dictating whether to use TLS for the connection to Axon Server.@Deprecated public Integer getInitialNrOfPermits()
getPermits()
@Deprecated public void setInitialNrOfPermits(Integer initialNrOfPermits)
setPermits(Integer)
public Integer getPermits()
5000
permits.public void setPermits(Integer permits)
5000
permits.permits
- The initial number of permits send for message streams (events, commands, queries).public Integer getNrOfNewPermits()
A value of null
, 0, and negative values will have the client request the number of permits required to
get from the "new-permits-threshold" to "initial-nr-of-permits".
public void setNrOfNewPermits(Integer nrOfNewPermits)
A value of null
, 0, and negative values will have the client request the number of permits required to
get from the "new-permits-threshold" to "initial-nr-of-permits".
nrOfNewPermits
- The additional number of permits send for message streams (events, commands, queries) when
application is ready for more messages.public Integer getNewPermitsThreshold()
A value of null
, 0, and negative values will have the threshold set to 50% of
the initial number of permits
.
public void setNewPermitsThreshold(Integer newPermitsThreshold)
A value of null
, 0, and negative values will have the threshold set to 50% of
the initial number of permits
.
newPermitsThreshold
- The threshold at which the application sends new permits to server.@Deprecated public EventCipher getEventCipher()
public AxonServerConfiguration.FlowControlConfiguration getEventFlowControl()
When not specified (null) the top-level flow control properties permits
, nrOfNewPermits
and
newPermitsThreshold
are used.
public void setEventFlowControl(AxonServerConfiguration.FlowControlConfiguration eventFlowControl)
flow control settings
for the event message stream.
When not specified (null) the top-level flow control properties permits
, nrOfNewPermits
and
newPermitsThreshold
are used.
eventFlowControl
- Specific flow control settings
for the event message
stream.public AxonServerConfiguration.FlowControlConfiguration getQueryFlowControl()
flow control settings
for the query message stream.
When not specified (null) the top-level flow control properties permits
, nrOfNewPermits
and
newPermitsThreshold
are used.
flow control settings
for the query message stream.public void setQueryFlowControl(AxonServerConfiguration.FlowControlConfiguration queryFlowControl)
flow control settings
for the query message stream.
When not specified (null) the top-level flow control properties permits
, nrOfNewPermits
and
newPermitsThreshold
are used.
queryFlowControl
- Specific flow control settings
for the query message
stream.public AxonServerConfiguration.FlowControlConfiguration getCommandFlowControl()
flow control settings
for the command message stream.
When not specified (null) the top-level flow control properties permits
, nrOfNewPermits
and
newPermitsThreshold
are used.
flow control settings
for the command message stream.public void setCommandFlowControl(AxonServerConfiguration.FlowControlConfiguration commandFlowControl)
flow control settings
for the command message stream.
When not specified (null) the top-level flow control properties permits
, nrOfNewPermits
and
newPermitsThreshold
are used.
commandFlowControl
- Specific flow control settings
for the command message
stream.public AxonServerConfiguration.FlowControlConfiguration getDefaultFlowControlConfiguration()
flow control settings
used when no specific
command
, event
, or
query
flow control settings are provided.flow control settings
used when no specific
command
, event
, or
query
flow control settings are provided.public int getCommandThreads()
10
threads.public void setCommandThreads(int commandThreads)
10
threads.commandThreads
- The number of threads executing commands.public int getQueryThreads()
10
threads.public void setQueryThreads(int queryThreads)
10
threads.queryThreads
- The number of threads executing queries.public int getProcessorsNotificationRate()
500
milliseconds.public void setProcessorsNotificationRate(int processorsNotificationRate)
500
milliseconds.processorsNotificationRate
- The interval (in ms.) application sends status updates on event processors to
Axon Server.public int getProcessorsNotificationInitialDelay()
5000
milliseconds.public void setProcessorsNotificationInitialDelay(int processorsNotificationInitialDelay)
5000
milliseconds.processorsNotificationInitialDelay
- The initial delay (in ms.) before application sends first status update
on event processors to Axon Server.public long getKeepAliveTimeout()
5000
milliseconds.public void setKeepAliveTimeout(long keepAliveTimeout)
5000
milliseconds.keepAliveTimeout
- The timeout (in ms) for keep alive requests.public long getKeepAliveTime()
1000
milliseconds.public void setKeepAliveTime(long keepAliveTime)
1000
milliseconds.keepAliveTime
- The interval (in ms) for keep alive requests, 0 is keep-alive disabled.public int getSnapshotPrefetch()
int
indicating the maximum number of Aggregate snapshots which will be retrieved. Defaults to
1
.int
indicating the maximum number of Aggregate snapshots which will be retrieved.public void setSnapshotPrefetch(int snapshotPrefetch)
1
.snapshotPrefetch
- The maximum number of Aggregate snapshots which will be retrieved.@Deprecated public boolean getSuppressDownloadMessage()
@Deprecated public void setSuppressDownloadMessage(boolean suppressDownloadMessage)
public int getMaxMessageSize()
0
, keeping the default value from the connector.public void setMaxMessageSize(int maxMessageSize)
0
, keeping the default value from the connector.maxMessageSize
- The gRPC max inbound message size.public int getCommitTimeout()
10_000
milliseconds.public void setCommitTimeout(int commitTimeout)
10_000
milliseconds.commitTimeout
- The timeout (in milliseconds) to wait for response on commit.@Deprecated public boolean isDisableEventBlacklisting()
setEventBlockListingEnabled(boolean)
.@Deprecated public void setDisableEventBlacklisting(boolean disableEventBlacklisting)
setEventBlockListingEnabled(boolean)
.public boolean isEventBlockListingEnabled()
Disabling this may have serious performance impact, as it requires all events
from Axon
Server to be sent to clients, even if a client is unable to process the event. Default is to have block-listing
enabled.
public void setEventBlockListingEnabled(boolean eventBlockListingEnabled)
Disabling this may have serious performance impact, as it requires all events
from Axon
Server to be sent to clients, even if a client is unable to process the event. Default is to have block-listing
enabled.
eventBlockListingEnabled
- Flag that allows block-listing of event types to be enabled.@Deprecated public int getMaxGrpcBufferedMessages()
@Deprecated public void setMaxGrpcBufferedMessages(int maxGrpcBufferedMessages)
public int getCommandLoadFactor()
int
representing the fixed value of load factor sent to Axon Server for any command's subscription if
no specific implementation of CommandLoadFactorProvider is configured. The default value is 100
.int
representing the fixed value of load factor sent to Axon Server for any command's
subscription if no specific implementation of CommandLoadFactorProvider is configured.public void setCommandLoadFactor(int commandLoadFactor)
int
representing the fixed value of load factor sent to Axon Server for any command's
subscription if no specific implementation of CommandLoadFactorProvider is configured. The default value is
100
.commandLoadFactor
- An int
representing the fixed value of load factor sent to Axon Server for any
command's subscription if no specific implementation of CommandLoadFactorProvider is
configured.public long getConnectTimeout()
public void setConnectTimeout(long connectTimeout)
connectTimeout
- The value representing the maximum time in milliseconds a request for the initial Axon
Server connection may last.public long getReconnectInterval()
servers
.
Defaults to 2000 (2 seconds).
public void setReconnectInterval(long reconnectInterval)
servers
.
Defaults to 2000 (2 seconds).
reconnectInterval
- The amount of time in milliseconds to wait in between attempts to connect to Axon
Server.public boolean isForceReadFromLeader()
If Axon Server SE is used, this property has no effect.
public void setForceReadFromLeader(boolean forceReadFromLeader)
If Axon Server SE is used, this property has no effect.
forceReadFromLeader
- The indicator whether it is OK to query events from the local Axon Server node - the
node the client is currently connected to.public boolean isForceReconnectThroughServers()
AxonServerConnectionManager
should always reconnect through the
servers
or try to reconnect with the server it just lost the connection with.
When true
(default), the AxonServerConnectionManager
will contact the servers for a new
destination each time a connection is dropped. When false
, the connector will first attempt to
re-establish a connection to the node it was previously connected to. When that fails, only then will it contact
the servers.
Default to true
, forcing the failed connection to be abandoned and a new one to be requested via the
routing servers.
AxonServerConnectionManager
should always reconnect through the
servers
or try to reconnect with the server it just lost the connection with.public void setForceReconnectThroughServers(boolean forceReconnectThroughServers)
AxonServerConnectionManager
should always reconnect through the
servers
or try to reconnect with the server it just lost the connection with.
When true
(default), the AxonServerConnectionManager
will contact the servers for a new
destination each time a connection is dropped. When false
, the connector will first attempt to
re-establish a connection to the node it was previously connected to. When that fails, only then will it contact
the servers.
Default to true
, forcing the failed connection to be abandoned and a new one to be requested via the
routing servers.
forceReconnectThroughServers
- The indicator whether the AxonServerConnectionManager
should always
reconnect through the servers
or try to reconnect with
the server it just lost the connection with.public int getConnectionManagementThreadPoolSize()
AxonServerConnectionFactory
used by the AxonServerConnectionManager
.
This includes activities related to connecting to Axon Server, setting up instruction streams, sending and validating heartbeats, etc.
Defaults to a pool size of 2
threads.
AxonServerConnectionFactory
used by the AxonServerConnectionManager
.public void setConnectionManagementThreadPoolSize(int connectionManagementThreadPoolSize)
AxonServerConnectionFactory
used by the AxonServerConnectionManager
.
This includes activities related to connecting to Axon Server, setting up instruction streams, sending and validating heartbeats, etc.
Defaults to a pool size of 2
threads.
connectionManagementThreadPoolSize
- The number of threads that should be used for connection management
activities by the AxonServerConnectionFactory
used by the
AxonServerConnectionManager
.public AxonServerConfiguration.HeartbeatConfiguration getHeartbeat()
public void setHeartbeat(AxonServerConfiguration.HeartbeatConfiguration heartbeat)
heartbeat
- The configuration specifics on sending heartbeat messages to ensure a fully operational
end-to-end connection with Axon Server.public AxonServerConfiguration.Eventhandling getEventhandling()
AxonServerConfiguration.Eventhandling
of this application for Axon Server.AxonServerConfiguration.Eventhandling
of this application for Axon Server.public void setEventhandling(AxonServerConfiguration.Eventhandling eventhandling)
AxonServerConfiguration.Eventhandling
of this application for Axon Servereventhandling
- The AxonServerConfiguration.Eventhandling
to set for this application.@ConfigurationProperties(prefix="axon.axonserver.event-store") public AxonServerConfiguration.EventStoreConfiguration getEventStoreConfiguration()
AxonServerConfiguration.EventStoreConfiguration
of this application for Axon Server.AxonServerConfiguration.EventStoreConfiguration
of this application for Axon Server.public void setEventStoreConfiguration(AxonServerConfiguration.EventStoreConfiguration eventStoreConfiguration)
AxonServerConfiguration.EventStoreConfiguration
of this application for Axon ServereventStoreConfiguration
- The AxonServerConfiguration.EventStoreConfiguration
to set for this application.public Map<String,AxonServerConfiguration.PersistentStreamSettings> getPersistentStreams()
Copyright © 2010–2024. All rights reserved.