public class PubSubInboundChannelAdapter
extends org.springframework.integration.endpoint.MessageProducerSupport
lifecycleCondition, lifecycleLock
Constructor and Description |
---|
PubSubInboundChannelAdapter(PubSubSubscriberOperations pubSubSubscriberOperations,
String subscriptionName) |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
AckMode |
getAckMode() |
org.springframework.messaging.MessageChannel |
getErrorChannel()
Workaround for GH-2615; prevents successful completion when exception received with closed context.
|
Class<?> |
getPayloadType() |
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 |
setPayloadType(Class<?> payloadType)
Set the desired type of the payload of the
Message constructed by
converting the incoming Pub/Sub message. |
afterSingletonsInstantiated, buildErrorMessage, 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)
public AckMode getAckMode()
public void setAckMode(AckMode ackMode)
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 org.springframework.messaging.MessageChannel getErrorChannel()
getErrorChannel
in class org.springframework.integration.endpoint.MessageProducerSupport
Copyright © 2021. All rights reserved.