Class PubSubConfigurationProperties
java.lang.Object
io.micronaut.gcp.pubsub.configuration.PubSubConfigurationProperties
Configuration properties for PubSub support.
- Since:
- 2.0.0
- Author:
- Vinicius Carvalho
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintHow often to ping the server to keep the channel alive.The name of theScheduledExecutorServiceto be used by allPublisherinstances.The name of theScheduledExecutorServiceto be used by allSubscriberinstances.Which endpoint thePublishershould publish messages to.booleanWhether subscribers should stop processing pending in-memory messages and eagerly nack() during application shutdown.voidsetKeepAliveIntervalMinutes(int keepAliveIntervalMinutes) How often to ping the server to keep the channel alive.voidsetNackOnShutdown(boolean nackOnShutdown) voidsetPublishingExecutor(String publishingExecutor) voidsetSubscribingExecutor(String subscribingExecutor) voidsetTopicEndpoint(String topicEndpoint)
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_NACK_ON_SHUTDOWN
public static final boolean DEFAULT_NACK_ON_SHUTDOWN- See Also:
-
-
Constructor Details
-
PubSubConfigurationProperties
public PubSubConfigurationProperties()
-
-
Method Details
-
getPublishingExecutor
The name of theScheduledExecutorServiceto be used by allPublisherinstances. Defaults to "scheduled".- Returns:
- the name of the publishing executor
-
setPublishingExecutor
- Parameters:
publishingExecutor- Name of theScheduledExecutorServiceto be used by allPublisherinstances. Default: "scheduled"
-
getSubscribingExecutor
The name of theScheduledExecutorServiceto be used by allSubscriberinstances. Defaults to "scheduled".- Returns:
- the name of the subscribing executor
-
setSubscribingExecutor
- Parameters:
subscribingExecutor- Name of theScheduledExecutorServiceto be used by allSubscriberinstances. Default: "scheduled"
-
getKeepAliveIntervalMinutes
public int getKeepAliveIntervalMinutes()How often to ping the server to keep the channel alive. Defaults to 5 minutes.- Returns:
- interval
-
setKeepAliveIntervalMinutes
public void setKeepAliveIntervalMinutes(int keepAliveIntervalMinutes) How often to ping the server to keep the channel alive. Default: 5 minutes.- Parameters:
keepAliveIntervalMinutes-
-
getTopicEndpoint
Which endpoint thePublishershould publish messages to. Defaults to the global endpoint- Returns:
- endpoint
-
setTopicEndpoint
- Parameters:
topicEndpoint- to be used by allPublisherinstances. Default: "" (i.e. the global endpoint)
-
isNackOnShutdown
public boolean isNackOnShutdown()Whether subscribers should stop processing pending in-memory messages and eagerly nack() during application shutdown. Defaults to false.- Returns:
- nack on shutdown configuration
- Since:
- 5.2.0
-
setNackOnShutdown
public void setNackOnShutdown(boolean nackOnShutdown) - Parameters:
nackOnShutdown- whether subscribers should stop processing pending in-memory messages and eagerly nack() during application shutdown.- Since:
- 5.2.0
-