Package io.axoniq.framework.springboot
Class SpringCloudProperties
java.lang.Object
io.axoniq.framework.springboot.SpringCloudProperties
Properties for configuring the Axoniq Framework Spring Cloud connector.
These properties are bound to the axon.springcloud prefix.
The two endpoint paths must be the same on every member of a cluster, since they are how members reach each other.
The command load factor is not configured here: it belongs to the distributed command bus as a whole, and is set
through DistributedCommandBusConfiguration.
- Since:
- 5.4.0
- Author:
- Allard Buijze
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the path this application serves its command handling capabilities under.Returns how long a member's capabilities are taken as current before it is asked for them again.Returns how long an instance is given to answer a capabilities request.Returns the path this application receives commands from other members under.Returns how long a member is given to answer a command.@Nullable StringReturns the service instance metadata property holding an instance's context root.Returns how long a service instance is left alone after answering a capabilities request with a client error.intReturns how many responses to a single query this application buffers.Returns the path this application receives queries from other members under.Returns how long this application waits for the responses to a query it dispatched.Returns how long a query's response stream may stay open.Returns how long a subscription may hear nothing before it is given up on.Returns how often an idle subscription query is written to.booleanReturns whether the Spring Cloud connector is enabled.voidsetCapabilitiesEndpoint(String capabilitiesEndpoint) Sets the path this application serves its command handling capabilities under.voidsetCapabilitiesRefreshInterval(Duration capabilitiesRefreshInterval) Sets how long a member's capabilities are taken as current before it is asked for them again.voidsetCapabilitiesTimeout(Duration capabilitiesTimeout) Sets how long an instance is given to answer a capabilities request.voidsetCommandEndpoint(String commandEndpoint) Sets the path this application receives commands from other members under.voidsetCommandReplyTimeout(Duration commandReplyTimeout) Sets how long a member is given to answer a command.voidsetContextRootMetadataPropertyName(@Nullable String contextRootMetadataPropertyName) Sets the service instance metadata property holding an instance's context root.voidsetEnabled(boolean enabled) Sets whether the Spring Cloud connector is enabled.voidsetIgnorePeriod(Duration ignorePeriod) Sets how long a service instance is left alone after answering a capabilities request with a client error.voidsetQueryBufferSize(int queryBufferSize) Sets how many responses to a single query this application buffers.voidsetQueryEndpoint(String queryEndpoint) Sets the path this application receives queries from other members under.voidsetQueryResponseTimeout(Duration queryResponseTimeout) Sets how long this application waits for the responses to a query it dispatched.voidsetQueryTimeout(Duration queryTimeout) Sets how long a query's response stream may stay open.voidsetSubscriptionInactivityTimeout(Duration subscriptionInactivityTimeout) Sets how long a subscription may hear nothing before it is given up on.voidsetSubscriptionKeepAliveInterval(Duration subscriptionKeepAliveInterval) Sets how often an idle subscription query is written to.
-
Constructor Details
-
SpringCloudProperties
public SpringCloudProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Returns whether the Spring Cloud connector is enabled.- Returns:
trueif enabled,falseotherwise
-
setEnabled
public void setEnabled(boolean enabled) Sets whether the Spring Cloud connector is enabled.- Parameters:
enabled-trueto enable,falseto disable
-
getCommandEndpoint
Returns the path this application receives commands from other members under.- Returns:
- the path commands are received under
-
setCommandEndpoint
Sets the path this application receives commands from other members under.- Parameters:
commandEndpoint- the path commands are received under
-
getCapabilitiesEndpoint
Returns the path this application serves its command handling capabilities under.- Returns:
- the path capabilities are served under
-
setCapabilitiesEndpoint
Sets the path this application serves its command handling capabilities under.- Parameters:
capabilitiesEndpoint- the path capabilities are served under
-
getQueryEndpoint
Returns the path this application receives queries from other members under.- Returns:
- the path this application receives queries under
-
setQueryEndpoint
Sets the path this application receives queries from other members under.- Parameters:
queryEndpoint- the path this application receives queries under
-
getCommandReplyTimeout
Returns how long a member is given to answer a command.- Returns:
- how long a member is given to answer a command
-
setCommandReplyTimeout
Sets how long a member is given to answer a command.- Parameters:
commandReplyTimeout- how long a member is given to answer a command
-
getQueryTimeout
Returns how long a query's response stream may stay open.- Returns:
- how long a query's response stream may stay open
-
setQueryTimeout
Sets how long a query's response stream may stay open.- Parameters:
queryTimeout- how long a query's response stream may stay open
-
getQueryResponseTimeout
Returns how long this application waits for the responses to a query it dispatched.- Returns:
- how long the responses to a dispatched query are waited for
-
setQueryResponseTimeout
Sets how long this application waits for the responses to a query it dispatched.- Parameters:
queryResponseTimeout- how long the responses to a dispatched query are waited for
-
getSubscriptionKeepAliveInterval
Returns how often an idle subscription query is written to.- Returns:
- how often an idle subscription query is written to
-
setSubscriptionKeepAliveInterval
Sets how often an idle subscription query is written to.- Parameters:
subscriptionKeepAliveInterval- how often an idle subscription query is written to
-
getSubscriptionInactivityTimeout
Returns how long a subscription may hear nothing before it is given up on.- Returns:
- how long a subscription may hear nothing before it is given up on
-
setSubscriptionInactivityTimeout
Sets how long a subscription may hear nothing before it is given up on.- Parameters:
subscriptionInactivityTimeout- how long a subscription may hear nothing before it is given up on
-
getQueryBufferSize
public int getQueryBufferSize()Returns how many responses to a single query this application buffers.- Returns:
- how many responses to a single query this application buffers
-
setQueryBufferSize
public void setQueryBufferSize(int queryBufferSize) Sets how many responses to a single query this application buffers.- Parameters:
queryBufferSize- how many responses to a single query this application buffers
-
getIgnorePeriod
Returns how long a service instance is left alone after answering a capabilities request with a client error.- Returns:
- the period an instance answering with a client error is ignored for
-
setIgnorePeriod
Sets how long a service instance is left alone after answering a capabilities request with a client error.- Parameters:
ignorePeriod- the period an instance answering with a client error is ignored for
-
getContextRootMetadataPropertyName
Returns the service instance metadata property holding an instance's context root.- Returns:
- the metadata property holding an instance's context root, or
nullwhen services are served from the root
-
setContextRootMetadataPropertyName
Sets the service instance metadata property holding an instance's context root.- Parameters:
contextRootMetadataPropertyName- the metadata property holding an instance's context root
-
getCapabilitiesTimeout
Returns how long an instance is given to answer a capabilities request.- Returns:
- the deadline for a capabilities request
-
setCapabilitiesTimeout
Sets how long an instance is given to answer a capabilities request.- Parameters:
capabilitiesTimeout- the deadline for a capabilities request
-
getCapabilitiesRefreshInterval
Returns how long a member's capabilities are taken as current before it is asked for them again.- Returns:
- how long a member's capabilities are taken as current
-
setCapabilitiesRefreshInterval
Sets how long a member's capabilities are taken as current before it is asked for them again. A zero or negative interval asks every member on every discovery heartbeat instead.- Parameters:
capabilitiesRefreshInterval- how long a member's capabilities are taken as current
-