public class AmqpOutboundEndpoint extends AbstractReplyProducingMessageHandler implements RabbitTemplate.ConfirmCallback, RabbitTemplate.ReturnCallback, ApplicationListener<ContextRefreshedEvent>
AbstractReplyProducingMessageHandler.RequestHandler
messagingTemplate
logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
AmqpOutboundEndpoint(AmqpTemplate amqpTemplate) |
Modifier and Type | Method and Description |
---|---|
void |
confirm(CorrelationData correlationData,
boolean ack,
String cause) |
protected void |
doInit() |
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected Object |
handleRequestMessage(Message<?> requestMessage)
Subclasses must implement this method to handle the request Message.
|
void |
onApplicationEvent(ContextRefreshedEvent event) |
void |
returnedMessage(Message message,
int replyCode,
String replyText,
String exchange,
String routingKey) |
void |
setConfirmAckChannel(MessageChannel ackChannel) |
void |
setConfirmCorrelationExpression(String confirmCorrelationExpression) |
void |
setConfirmNackChannel(MessageChannel nackChannel) |
void |
setDefaultDeliveryMode(MessageDeliveryMode defaultDeliveryMode) |
void |
setExchangeName(String exchangeName) |
void |
setExchangeNameExpression(String exchangeNameExpression) |
void |
setExpectReply(boolean expectReply) |
void |
setHeaderMapper(AmqpHeaderMapper headerMapper) |
void |
setLazyConnect(boolean lazyConnect)
Set to
false to attempt to connect during endpoint start;
default true , meaning the connection will be attempted
to be established on the arrival of the first message. |
void |
setReturnChannel(MessageChannel returnChannel) |
void |
setRoutingKey(String routingKey) |
void |
setRoutingKeyExpression(String routingKeyExpression) |
doInvokeAdvisedRequestHandler, handleMessageInternal, hasAdviceChain, onInit, produceReply, setAdviceChain, setBeanClassLoader, setChannelResolver, setRequiresReply, shouldCopyRequestHeaders
getOutputChannel, setOutputChannel, setOutputChannelName, setSendTimeout
getOrder, handleMessage, setOrder, setShouldTrack
afterPropertiesSet, getApplicationContext, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getComponentName
public AmqpOutboundEndpoint(AmqpTemplate amqpTemplate)
public void setHeaderMapper(AmqpHeaderMapper headerMapper)
public void setExchangeName(String exchangeName)
public void setExchangeNameExpression(String exchangeNameExpression)
public void setRoutingKey(String routingKey)
public void setRoutingKeyExpression(String routingKeyExpression)
public void setExpectReply(boolean expectReply)
public void setConfirmCorrelationExpression(String confirmCorrelationExpression)
public void setConfirmAckChannel(MessageChannel ackChannel)
public void setConfirmNackChannel(MessageChannel nackChannel)
public void setReturnChannel(MessageChannel returnChannel)
public void setDefaultDeliveryMode(MessageDeliveryMode defaultDeliveryMode)
public void setLazyConnect(boolean lazyConnect)
false
to attempt to connect during endpoint start;
default true
, meaning the connection will be attempted
to be established on the arrival of the first message.lazyConnect
- the lazyConnect to setpublic String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class AbstractMessageHandler
protected void doInit()
doInit
in class AbstractReplyProducingMessageHandler
public void onApplicationEvent(ContextRefreshedEvent event)
onApplicationEvent
in interface ApplicationListener<ContextRefreshedEvent>
protected Object handleRequestMessage(Message<?> requestMessage)
AbstractReplyProducingMessageHandler
handleRequestMessage
in class AbstractReplyProducingMessageHandler
requestMessage
- The request message.null
.public void confirm(CorrelationData correlationData, boolean ack, String cause)
confirm
in interface RabbitTemplate.ConfirmCallback
public void returnedMessage(Message message, int replyCode, String replyText, String exchange, String routingKey)
returnedMessage
in interface RabbitTemplate.ReturnCallback