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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
How often to ping the server to keep the channel alive.The name of theScheduledExecutorService
to be used by allPublisher
instances.The name of theScheduledExecutorService
to be used by allSubscriber
instances.Which endpoint thePublisher
should publish messages to.boolean
Whether subscribers should stop processing pending in-memory messages and eagerly nack() during application shutdown.void
setKeepAliveIntervalMinutes
(int keepAliveIntervalMinutes) How often to ping the server to keep the channel alive.void
setNackOnShutdown
(boolean nackOnShutdown) void
setPublishingExecutor
(String publishingExecutor) void
setSubscribingExecutor
(String subscribingExecutor) void
setTopicEndpoint
(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 theScheduledExecutorService
to be used by allPublisher
instances. Defaults to "scheduled".- Returns:
- the name of the publishing executor
-
setPublishingExecutor
- Parameters:
publishingExecutor
- Name of theScheduledExecutorService
to be used by allPublisher
instances. Default: "scheduled"
-
getSubscribingExecutor
The name of theScheduledExecutorService
to be used by allSubscriber
instances. Defaults to "scheduled".- Returns:
- the name of the subscribing executor
-
setSubscribingExecutor
- Parameters:
subscribingExecutor
- Name of theScheduledExecutorService
to be used by allSubscriber
instances. 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 thePublisher
should publish messages to. Defaults to the global endpoint- Returns:
- endpoint
-
setTopicEndpoint
- Parameters:
topicEndpoint
- to be used by allPublisher
instances. 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
-