public class PollableAmqpChannel extends AbstractAmqpChannel implements PollableChannel
PollableChannel
implementation that is backed by an AMQP Queue.
Messages will be sent to the default (no-name) exchange with that Queue's
name as the routing key.AbstractMessageChannel.ChannelInterceptorList
logger
INDEFINITE_TIMEOUT
Constructor and Description |
---|
PollableAmqpChannel(String channelName,
AmqpTemplate amqpTemplate) |
Modifier and Type | Method and Description |
---|---|
protected String |
getRoutingKey()
Subclasses may override this method to return a routing key.
|
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
Message<?> |
receive() |
Message<?> |
receive(long timeout) |
void |
setAmqpAdmin(AmqpAdmin amqpAdmin)
Provide an instance of AmqpAdmin for implicitly declaring Queues if the queueName is not provided.
|
void |
setQueueName(String queueName)
Provide an explicitly configured queue name.
|
doSend, getExchangeName
addInterceptor, addInterceptor, getChannelInterceptors, getComponentType, getFullChannelName, getInterceptors, send, send, setConversionService, setDatatypes, setInterceptors, setMessageConverter, setShouldTrack
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setMessageBuilderFactory, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
send, send
getComponentName
public PollableAmqpChannel(String channelName, AmqpTemplate amqpTemplate)
public void setQueueName(String queueName)
queueName
- The queue name.public void setAmqpAdmin(AmqpAdmin amqpAdmin)
amqpAdmin
- The amqp admin.protected void onInit() throws Exception
IntegrationObjectSupport
onInit
in class AbstractMessageChannel
Exception
- Any exception.protected String getRoutingKey()
AbstractAmqpChannel
getRoutingKey
in class AbstractAmqpChannel
public Message<?> receive()
receive
in interface PollableChannel
public Message<?> receive(long timeout)
receive
in interface PollableChannel