public class PubSubInboundChannelAdapter
extends org.springframework.integration.endpoint.MessageProducerSupport
lifecycleCondition, lifecycleLock
Constructor and Description |
---|
PubSubInboundChannelAdapter(PubSubSubscriberOperations pubSubSubscriberOperations,
String subscriptionName)
Instantiates a streaming Pub/Sub subscirtion adapter.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
AckMode |
getAckMode() |
Class<?> |
getPayloadType() |
boolean |
healthCheckEnabled() |
void |
setAckMode(AckMode ackMode) |
void |
setHeaderMapper(org.springframework.integration.mapping.HeaderMapper<Map<String,String>> headerMapper)
Set the header mapper to map headers from incoming
PubsubMessage
into Message . |
void |
setHealthTrackerRegistry(HealthTrackerRegistry healthTrackerRegistry) |
void |
setPayloadType(Class<?> payloadType)
Set the desired type of the payload of the
Message
constructed by converting the incoming Pub/Sub message. |
afterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, onInit, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisher
destroy, doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stop
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getComponentType, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
public PubSubInboundChannelAdapter(PubSubSubscriberOperations pubSubSubscriberOperations, String subscriptionName)
pubSubSubscriberOperations
- PubSubSubscriberOperations
to usesubscriptionName
- short or fully qualified subscription namepublic AckMode getAckMode()
public void setAckMode(AckMode ackMode)
public void setHealthTrackerRegistry(HealthTrackerRegistry healthTrackerRegistry)
public Class<?> getPayloadType()
public void setPayloadType(Class<?> payloadType)
Message
constructed by converting the incoming Pub/Sub message. The channel adapter will use the PubSubMessageConverter
configured for PubSubSubscriberOperations.subscribeAndConvert(String, java.util.function.Consumer, Class)
.
The default payload type is byte[].class
.payloadType
- the type of the payload of the Message
produced by the adapter. Cannot be set to null.public void setHeaderMapper(org.springframework.integration.mapping.HeaderMapper<Map<String,String>> headerMapper)
PubsubMessage
into Message
.headerMapper
- the header mapperprotected void doStart()
doStart
in class org.springframework.integration.endpoint.MessageProducerSupport
protected void doStop()
doStop
in class org.springframework.integration.endpoint.MessageProducerSupport
public boolean healthCheckEnabled()
Copyright © 2022. All rights reserved.