Class SubscriberConfigurationProperties
java.lang.Object
io.micronaut.gcp.pubsub.configuration.SubscriberConfigurationProperties
@EachProperty("gcp.pubsub.subscriber")
public class SubscriberConfigurationProperties
extends Object
Configuration properties for PubSub
Subscriber
. Each topic has its own configuration if set by the user.
for example gcp.pubsub.publisher.animals and gcp.pubsub.publisher.cars would define subscribers with different
configurations for each Subscription
.- Since:
- 2.0.0
- Author:
- Vinicius Carvalho
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.api.gax.batching.FlowControlSettings.Builder
Flow Control settings.org.threeten.bp.Duration
Set the maximum period a message ack deadline will be extended.org.threeten.bp.Duration
getName()
void
setExecutor
(String executor) void
setFlowControlSettings
(com.google.api.gax.batching.FlowControlSettings.Builder flowControlSettings) Flow Control settings.void
setMaxAckExtensionPeriod
(org.threeten.bp.Duration maxAckExtensionPeriod) Set the maximum period a message ack deadline will be extended.void
setMaxDurationPerAckExtension
(org.threeten.bp.Duration maxDurationPerAckExtension) Set the upper bound for a single mod ack extention period.void
setParallelPullCount
(Integer parallelPullCount)
-
Constructor Details
-
SubscriberConfigurationProperties
- Parameters:
name
- of this configuration.
-
-
Method Details
-
getParallelPullCount
- Returns:
- number of concurrent pulls
-
setParallelPullCount
- Parameters:
parallelPullCount
- number of concurrent pulls
-
getMaxAckExtensionPeriod
public org.threeten.bp.Duration getMaxAckExtensionPeriod()Set the maximum period a message ack deadline will be extended. Defaults to one hour.- Returns:
- max ack deadline.
-
setMaxAckExtensionPeriod
public void setMaxAckExtensionPeriod(org.threeten.bp.Duration maxAckExtensionPeriod) Set the maximum period a message ack deadline will be extended. Defaults to one hour.- Parameters:
maxAckExtensionPeriod
- value
-
getMaxDurationPerAckExtension
public org.threeten.bp.Duration getMaxDurationPerAckExtension()- Returns:
- the maxDurationPerAckExtension
-
setMaxDurationPerAckExtension
public void setMaxDurationPerAckExtension(org.threeten.bp.Duration maxDurationPerAckExtension) Set the upper bound for a single mod ack extention period.The ack deadline will continue to be extended by up to this duration until MaxAckExtensionPeriod is reached. Setting MaxDurationPerAckExtension bounds the maximum amount of time before a mesage re-delivery in the event the Subscriber fails to extend the deadline.
MaxDurationPerAckExtension configuration can be disabled by specifying a zero duration.
- Parameters:
maxDurationPerAckExtension
- value
-
getName
- Returns:
- the name of the configuration
-
getExecutor
- Returns:
- executor name
-
setExecutor
- Parameters:
executor
- name to be set
-
getFlowControlSettings
public com.google.api.gax.batching.FlowControlSettings.Builder getFlowControlSettings()Flow Control settings.- Returns:
- flowControlSettings
-
setFlowControlSettings
public void setFlowControlSettings(com.google.api.gax.batching.FlowControlSettings.Builder flowControlSettings) Flow Control settings.- Parameters:
flowControlSettings
- flow control settings
-