Class AmqpChannelFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<AbstractAmqpChannel>
org.springframework.integration.amqp.config.AmqpChannelFactoryBean
- All Implemented Interfaces:
- Aware,- BeanClassLoaderAware,- BeanFactoryAware,- BeanNameAware,- DisposableBean,- FactoryBean<AbstractAmqpChannel>,- InitializingBean,- Lifecycle,- Phased,- SmartLifecycle
public class AmqpChannelFactoryBean
extends AbstractFactoryBean<AbstractAmqpChannel>
implements SmartLifecycle, BeanNameAware
If point-to-point, we send to the default exchange with the routing key
 equal to "[beanName]" and we declare that same Queue and register a listener
 if message-driven or poll explicitly otherwise. If publish-subscribe, we declare
 a FanoutExchange named "si.fanout.[beanName]" and we send to that without any
 routing key, and on the receiving side, we create an anonymous Queue that is
 bound to that exchange.
- Since:
- 2.1
- Author:
- Mark Fisher, Gary Russell, Artem Bilan, Ngoc Nhan
- 
Field SummaryFields inherited from class org.springframework.beans.factory.config.AbstractFactoryBeanloggerFields inherited from interface org.springframework.beans.factory.FactoryBeanOBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected AbstractAmqpChannelprotected voiddestroyInstance(AbstractAmqpChannel instance) Class<?> intgetPhase()booleanbooleanvoidsetAcknowledgeMode(AcknowledgeMode acknowledgeMode) voidsetAdviceChain(Advice[] adviceChain) voidsetAmqpAdmin(AmqpAdmin amqpAdmin) This is an optional reference to an AmqpAdmin to use when declaring a Queue implicitly for a PollableAmqpChannel.voidsetAutoStartup(boolean autoStartup) voidsetBatchSize(Integer batchSize) voidsetBeanName(String name) voidsetChannelTransacted(boolean channelTransacted) voidsetConcurrentConsumers(int concurrentConsumers) voidsetConnectionFactory(ConnectionFactory connectionFactory) voidsetConsumersPerQueue(Integer consumersPerQueue) voidsetDefaultDeliveryMode(MessageDeliveryMode defaultDeliveryMode) voidsetEncoding(String encoding) voidsetErrorHandler(ErrorHandler errorHandler) voidsetExchange(FanoutExchange exchange) Set the FanoutExchange to use.voidsetExposeListenerChannel(boolean exposeListenerChannel) voidsetExtractPayload(Boolean extractPayload) voidsetHeadersLast(boolean headersLast) voidsetInboundHeaderMapper(AmqpHeaderMapper inboundMapper) voidsetInterceptors(List<ChannelInterceptor> interceptors) voidsetMaxSubscribers(int maxSubscribers) voidsetMessageConverter(MessageConverter messageConverter) voidsetMessagePropertiesConverter(MessagePropertiesConverter messagePropertiesConverter) voidsetMissingQueuesFatal(Boolean missingQueuesFatal) voidsetOutboundHeaderMapper(AmqpHeaderMapper outboundMapper) voidsetPhase(int phase) voidsetPrefetchCount(int prefetchCount) voidsetPubSub(boolean pubSub) voidsetQueueName(String queueName) Set the Queue name to use.voidsetReceiveTimeout(long receiveTimeout) voidsetRecoveryInterval(long recoveryInterval) voidsetShutdownTimeout(long shutdownTimeout) voidsetTaskExecutor(Executor taskExecutor) voidsetTemplateChannelTransacted(boolean channelTransacted) voidsetTransactionAttribute(TransactionAttribute transactionAttribute) voidsetTransactionManager(PlatformTransactionManager transactionManager) voidstart()voidstop()voidMethods inherited from class org.springframework.beans.factory.config.AbstractFactoryBeanafterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
- 
Constructor Details- 
AmqpChannelFactoryBeanpublic AmqpChannelFactoryBean()
- 
AmqpChannelFactoryBeanpublic AmqpChannelFactoryBean(boolean messageDriven) 
 
- 
- 
Method Details- 
setBeanName- Specified by:
- setBeanNamein interface- BeanNameAware
 
- 
setInterceptors
- 
setAmqpAdminThis is an optional reference to an AmqpAdmin to use when declaring a Queue implicitly for a PollableAmqpChannel. It is not needed for the message-driven (Subscribable) channels since those are able to create a RabbitAdmin instance using the underlying listener container's ConnectionFactory.- Parameters:
- amqpAdmin- The amqp admin.
 
- 
setExchangeSet the FanoutExchange to use. This is only relevant for publish-subscribe-channels, and even then if not provided, a FanoutExchange will be implicitly created.- Parameters:
- exchange- The fanout exchange.
 
- 
setQueueNameSet the Queue name to use. This is only relevant for point-to-point channels, even then if not provided, a Queue will be implicitly created.- Parameters:
- queueName- The queue name.
 
- 
setEncoding
- 
setMessageConverter
- 
setTemplateChannelTransactedpublic void setTemplateChannelTransacted(boolean channelTransacted) 
- 
setChannelTransactedpublic void setChannelTransacted(boolean channelTransacted) 
- 
setConnectionFactory
- 
setMessagePropertiesConverter
- 
setAcknowledgeMode
- 
setAdviceChain
- 
setAutoStartuppublic void setAutoStartup(boolean autoStartup) 
- 
setConcurrentConsumerspublic void setConcurrentConsumers(int concurrentConsumers) 
- 
setConsumersPerQueue
- 
setErrorHandler
- 
setExposeListenerChannelpublic void setExposeListenerChannel(boolean exposeListenerChannel) 
- 
setPhasepublic void setPhase(int phase) 
- 
setPrefetchCountpublic void setPrefetchCount(int prefetchCount) 
- 
setPubSubpublic void setPubSub(boolean pubSub) 
- 
setReceiveTimeoutpublic void setReceiveTimeout(long receiveTimeout) 
- 
setRecoveryIntervalpublic void setRecoveryInterval(long recoveryInterval) 
- 
setShutdownTimeoutpublic void setShutdownTimeout(long shutdownTimeout) 
- 
setTaskExecutor
- 
setTransactionAttribute
- 
setTransactionManager
- 
setBatchSize
- 
setMaxSubscriberspublic void setMaxSubscribers(int maxSubscribers) 
- 
setMissingQueuesFatal
- 
setDefaultDeliveryMode
- 
setExtractPayload
- 
setOutboundHeaderMapper
- 
setInboundHeaderMapper
- 
setHeadersLastpublic void setHeadersLast(boolean headersLast) 
- 
getObjectType- Specified by:
- getObjectTypein interface- FactoryBean<AbstractAmqpChannel>
- Specified by:
- getObjectTypein class- AbstractFactoryBean<AbstractAmqpChannel>
 
- 
createInstance- Specified by:
- createInstancein class- AbstractFactoryBean<AbstractAmqpChannel>
 
- 
isAutoStartuppublic boolean isAutoStartup()- Specified by:
- isAutoStartupin interface- SmartLifecycle
 
- 
getPhasepublic int getPhase()- Specified by:
- getPhasein interface- Phased
- Specified by:
- getPhasein interface- SmartLifecycle
 
- 
isRunning
- 
start
- 
stop
- 
stop- Specified by:
- stopin interface- SmartLifecycle
 
- 
destroyInstance- Overrides:
- destroyInstancein class- AbstractFactoryBean<AbstractAmqpChannel>
 
 
-