public class PollableAmqpChannel extends AbstractAmqpChannel implements PollableChannel, PollableChannelManagement
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.ChannelInterceptorListloggerINDEFINITE_TIMEOUT| Constructor and Description |
|---|
PollableAmqpChannel(String channelName,
AmqpTemplate amqpTemplate) |
| Modifier and Type | Method and Description |
|---|---|
int |
getReceiveCount() |
long |
getReceiveCountLong() |
int |
getReceiveErrorCount() |
long |
getReceiveErrorCountLong() |
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, isLoggingEnabled, setLoggingEnabledaddInterceptor, addInterceptor, configureMetrics, enableCounts, enableStats, getChannelInterceptors, getComponentType, getErrorRate, getFullChannelName, getInterceptors, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMetrics, getMinSendDuration, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSend, isCountsEnabled, isStatsEnabled, removeInterceptor, removeInterceptor, reset, send, send, setConversionService, setDatatypes, setInterceptors, setMessageConverter, setShouldTrackafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setMessageBuilderFactory, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsend, sendgetErrorRate, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMinSendDuration, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSendenableStats, isStatsEnabledenableCounts, isCountsEnabled, isLoggingEnabled, reset, setLoggingEnabledgetComponentNamepublic PollableAmqpChannel(String channelName, AmqpTemplate amqpTemplate)
public void setQueueName(String queueName)
queueName - The queue name.public void setAmqpAdmin(AmqpAdmin amqpAdmin)
amqpAdmin - The amqp admin.public int getReceiveCount()
getReceiveCount in interface PollableChannelManagementpublic long getReceiveCountLong()
getReceiveCountLong in interface PollableChannelManagementpublic int getReceiveErrorCount()
getReceiveErrorCount in interface PollableChannelManagementpublic long getReceiveErrorCountLong()
getReceiveErrorCountLong in interface PollableChannelManagementprotected String getRoutingKey()
AbstractAmqpChannelgetRoutingKey in class AbstractAmqpChannelprotected void onInit()
throws Exception
IntegrationObjectSupportonInit in class AbstractMessageChannelException - Any exception.public Message<?> receive()
receive in interface PollableChannelpublic Message<?> receive(long timeout)
receive in interface PollableChannel