Class GcpPubSubAutoConfiguration
java.lang.Object
com.google.cloud.spring.autoconfigure.pubsub.GcpPubSubAutoConfiguration
@AutoConfiguration
@AutoConfigureAfter(GcpContextAutoConfiguration.class)
@ConditionalOnProperty(value="spring.cloud.gcp.pubsub.enabled",
matchIfMissing=true)
@ConditionalOnClass(PubSubTemplate.class)
@EnableConfigurationProperties(GcpPubSubProperties.class)
public class GcpPubSubAutoConfiguration
extends Object
Auto-config for Pub/Sub.
-
Constructor Summary
ConstructorDescriptionGcpPubSubAutoConfiguration
(GcpPubSubProperties gcpPubSubProperties, GcpProjectIdProvider gcpProjectIdProvider, com.google.api.gax.core.CredentialsProvider credentialsProvider, org.springframework.beans.factory.ObjectProvider<SelectiveSchedulerThreadNameProvider> selectiveSchedulerThreadNameProvider, org.springframework.context.ApplicationContext applicationContext) -
Method Summary
Modifier and TypeMethodDescriptiondefaultPublisherFactory
(com.google.api.gax.core.ExecutorProvider executorProvider, org.springframework.beans.factory.ObjectProvider<com.google.api.gax.batching.BatchingSettings> batchingSettings, org.springframework.beans.factory.ObjectProvider<com.google.api.gax.retrying.RetrySettings> retrySettings, com.google.api.gax.rpc.TransportChannelProvider publisherTransportChannelProvider, org.springframework.beans.factory.ObjectProvider<PublisherCustomizer> customizersProvider) defaultSubscriberFactory
(Optional<com.google.api.gax.core.ExecutorProvider> executorProvider, org.springframework.beans.factory.ObjectProvider<com.google.api.gax.core.ExecutorProvider> systemExecutorProvider, org.springframework.beans.factory.ObjectProvider<com.google.api.gax.batching.FlowControlSettings> flowControlSettings, org.springframework.beans.factory.ObjectProvider<com.google.api.core.ApiClock> apiClock, org.springframework.beans.factory.ObjectProvider<com.google.api.gax.retrying.RetrySettings> retrySettings, org.springframework.beans.factory.ObjectProvider<HealthTrackerRegistry> healthTrackerRegistry, com.google.api.gax.rpc.TransportChannelProvider subscriberTransportChannelProvider) com.google.api.gax.batching.BatchingSettings
com.google.api.gax.core.ExecutorProvider
publisherExecutorProvider
(org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler scheduler) com.google.api.gax.retrying.RetrySettings
com.google.api.gax.rpc.TransportChannelProvider
pubSubAdmin
(com.google.cloud.pubsub.v1.TopicAdminClient topicAdminClient, com.google.cloud.pubsub.v1.SubscriptionAdminClient subscriptionAdminClient) pubSubPublisherTemplate
(PublisherFactory publisherFactory, org.springframework.beans.factory.ObjectProvider<PubSubMessageConverter> pubSubMessageConverter) org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
pubSubSubscriberTemplate
(SubscriberFactory subscriberFactory, org.springframework.beans.factory.ObjectProvider<PubSubMessageConverter> pubSubMessageConverter, org.springframework.beans.factory.ObjectProvider<Executor> asyncPullExecutor, Executor ackExecutor) pubSubTemplate
(PubSubPublisherTemplate pubSubPublisherTemplate, PubSubSubscriberTemplate pubSubSubscriberTemplate) void
com.google.api.gax.rpc.TransportChannelProvider
com.google.cloud.pubsub.v1.SubscriptionAdminClient
subscriptionAdminClient
(com.google.api.gax.rpc.TransportChannelProvider subscriberTransportChannelProvider) com.google.cloud.pubsub.v1.TopicAdminClient
topicAdminClient
(com.google.cloud.pubsub.v1.TopicAdminSettings topicAdminSettings) com.google.cloud.pubsub.v1.TopicAdminSettings
topicAdminSettings
(com.google.api.gax.rpc.TransportChannelProvider publisherTransportChannelProvider)
-
Constructor Details
-
GcpPubSubAutoConfiguration
public GcpPubSubAutoConfiguration(GcpPubSubProperties gcpPubSubProperties, GcpProjectIdProvider gcpProjectIdProvider, com.google.api.gax.core.CredentialsProvider credentialsProvider, org.springframework.beans.factory.ObjectProvider<SelectiveSchedulerThreadNameProvider> selectiveSchedulerThreadNameProvider, org.springframework.context.ApplicationContext applicationContext) throws IOException - Throws:
IOException
-
-
Method Details
-
pubsubPublisherThreadPool
@Bean @ConditionalOnMissingBean(name="pubsubPublisherThreadPool") public org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler pubsubPublisherThreadPool() -
publisherExecutorProvider
@Bean @ConditionalOnMissingBean(name="publisherExecutorProvider") public com.google.api.gax.core.ExecutorProvider publisherExecutorProvider(@Qualifier("pubsubPublisherThreadPool") org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler scheduler) -
pubSubPublisherTemplate
@Bean @ConditionalOnMissingBean public PubSubPublisherTemplate pubSubPublisherTemplate(PublisherFactory publisherFactory, org.springframework.beans.factory.ObjectProvider<PubSubMessageConverter> pubSubMessageConverter) -
pubSubAcknowledgementExecutor
@Bean @ConditionalOnMissingBean(name="pubSubAcknowledgementExecutor") public Executor pubSubAcknowledgementExecutor() -
pubSubSubscriberTemplate
@Bean @ConditionalOnMissingBean public PubSubSubscriberTemplate pubSubSubscriberTemplate(SubscriberFactory subscriberFactory, org.springframework.beans.factory.ObjectProvider<PubSubMessageConverter> pubSubMessageConverter, @Qualifier("pubSubAsynchronousPullExecutor") org.springframework.beans.factory.ObjectProvider<Executor> asyncPullExecutor, @Qualifier("pubSubAcknowledgementExecutor") Executor ackExecutor) -
pubSubTemplate
@Bean @ConditionalOnMissingBean public PubSubTemplate pubSubTemplate(PubSubPublisherTemplate pubSubPublisherTemplate, PubSubSubscriberTemplate pubSubSubscriberTemplate) -
defaultSubscriberFactory
@Bean @ConditionalOnMissingBean public SubscriberFactory defaultSubscriberFactory(@Qualifier("subscriberExecutorProvider") Optional<com.google.api.gax.core.ExecutorProvider> executorProvider, @Qualifier("subscriberSystemExecutorProvider") org.springframework.beans.factory.ObjectProvider<com.google.api.gax.core.ExecutorProvider> systemExecutorProvider, @Qualifier("subscriberFlowControlSettings") org.springframework.beans.factory.ObjectProvider<com.google.api.gax.batching.FlowControlSettings> flowControlSettings, @Qualifier("subscriberApiClock") org.springframework.beans.factory.ObjectProvider<com.google.api.core.ApiClock> apiClock, @Qualifier("subscriberRetrySettings") org.springframework.beans.factory.ObjectProvider<com.google.api.gax.retrying.RetrySettings> retrySettings, @Qualifier("healthTrackerRegistry") org.springframework.beans.factory.ObjectProvider<HealthTrackerRegistry> healthTrackerRegistry, @Qualifier("subscriberTransportChannelProvider") com.google.api.gax.rpc.TransportChannelProvider subscriberTransportChannelProvider) -
publisherBatchSettings
@Bean @ConditionalOnMissingBean(name="publisherBatchSettings") public com.google.api.gax.batching.BatchingSettings publisherBatchSettings() -
publisherRetrySettings
@Bean @ConditionalOnMissingBean(name="publisherRetrySettings") public com.google.api.gax.retrying.RetrySettings publisherRetrySettings() -
defaultPublisherFactory
@Bean @ConditionalOnMissingBean public PublisherFactory defaultPublisherFactory(@Qualifier("publisherExecutorProvider") com.google.api.gax.core.ExecutorProvider executorProvider, @Qualifier("publisherBatchSettings") org.springframework.beans.factory.ObjectProvider<com.google.api.gax.batching.BatchingSettings> batchingSettings, @Qualifier("publisherRetrySettings") org.springframework.beans.factory.ObjectProvider<com.google.api.gax.retrying.RetrySettings> retrySettings, @Qualifier("publisherTransportChannelProvider") com.google.api.gax.rpc.TransportChannelProvider publisherTransportChannelProvider, org.springframework.beans.factory.ObjectProvider<PublisherCustomizer> customizersProvider) -
pubSubAdmin
@Bean @ConditionalOnMissingBean public PubSubAdmin pubSubAdmin(com.google.cloud.pubsub.v1.TopicAdminClient topicAdminClient, com.google.cloud.pubsub.v1.SubscriptionAdminClient subscriptionAdminClient) -
topicAdminClient
@Bean @ConditionalOnMissingBean public com.google.cloud.pubsub.v1.TopicAdminClient topicAdminClient(com.google.cloud.pubsub.v1.TopicAdminSettings topicAdminSettings) -
topicAdminSettings
@Bean @ConditionalOnMissingBean public com.google.cloud.pubsub.v1.TopicAdminSettings topicAdminSettings(@Qualifier("publisherTransportChannelProvider") com.google.api.gax.rpc.TransportChannelProvider publisherTransportChannelProvider) -
subscriptionAdminClient
@Bean @ConditionalOnMissingBean public com.google.cloud.pubsub.v1.SubscriptionAdminClient subscriptionAdminClient(@Qualifier("subscriberTransportChannelProvider") com.google.api.gax.rpc.TransportChannelProvider subscriberTransportChannelProvider) -
subscriberTransportChannelProvider
@Bean @ConditionalOnMissingBean(name="subscriberTransportChannelProvider") public com.google.api.gax.rpc.TransportChannelProvider subscriberTransportChannelProvider() -
publisherTransportChannelProvider
@Bean @ConditionalOnMissingBean(name="publisherTransportChannelProvider") public com.google.api.gax.rpc.TransportChannelProvider publisherTransportChannelProvider() -
registerSubscriberSettings
@PostConstruct public void registerSubscriberSettings()
-