Class SpringRabbitMQEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.component.springrabbit.SpringRabbitMQEndpoint
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.AsyncEndpoint,org.apache.camel.CamelContextAware,org.apache.camel.ComponentAware,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.EndpointServiceLocation,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.HasId,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="3.8.0",
scheme="spring-rabbitmq",
title="Spring RabbitMQ",
syntax="spring-rabbitmq:exchangeName",
category=MESSAGING,
headersClass=SpringRabbitMQConstants.class)
public class SpringRabbitMQEndpoint
extends org.apache.camel.support.DefaultEndpoint
implements org.apache.camel.AsyncEndpoint, org.apache.camel.spi.EndpointServiceLocation
Send and receive messages from RabbitMQ using the Spring RabbitMQ client.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsConstructorDescriptionSpringRabbitMQEndpoint(String endpointUri, org.apache.camel.Component component, String exchangeName) -
Method Summary
Modifier and TypeMethodDescriptionvoidorg.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor) org.apache.camel.ExchangecreateExchange(org.springframework.amqp.core.Message message) org.springframework.amqp.rabbit.core.RabbitTemplateFactory method for creating a new template for InOnly message exchangesorg.springframework.amqp.rabbit.AsyncRabbitTemplateFactory method for creating a new template for InOut message exchangesorg.springframework.amqp.rabbit.listener.AbstractMessageListenerContainerorg.apache.camel.PollingConsumerorg.apache.camel.ProducervoiddeclareElements(org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer container) voiddeclareElements(org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer container, org.springframework.amqp.core.AmqpAdmin admin) protected voiddoInit()org.springframework.amqp.core.AcknowledgeModegetArgs()longorg.springframework.amqp.rabbit.connection.ConnectionFactoryintorg.springframework.amqp.support.converter.MessageConverterlongorg.springframework.retry.interceptor.RetryOperationsInterceptorgetRetry()intbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanprotected booleanprotected StringvoidsetAcknowledgeMode(org.springframework.amqp.core.AcknowledgeMode acknowledgeMode) voidsetAllowNullBody(boolean allowNullBody) voidvoidsetAsyncConsumer(boolean asyncConsumer) voidsetAutoDeclare(boolean autoDeclare) voidsetAutoDeclareProducer(boolean autoDeclareProducer) voidsetAutoStartup(boolean autoStartup) voidsetConcurrentConsumers(Integer concurrentConsumers) voidsetConfirm(String confirm) voidsetConfirmTimeout(long confirmTimeout) voidsetConnectionFactory(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory) voidsetDeadLetterExchange(String deadLetterExchange) voidsetDeadLetterExchangeType(String deadLetterExchangeType) voidsetDeadLetterQueue(String deadLetterQueue) voidsetDeadLetterRoutingKey(String deadLetterRoutingKey) voidsetDisableReplyTo(boolean disableReplyTo) voidsetExchangeType(String exchangeType) voidsetExclusive(boolean exclusive) voidsetMaxConcurrentConsumers(Integer maxConcurrentConsumers) voidsetMaximumRetryAttempts(int maximumRetryAttempts) voidsetMessageConverter(org.springframework.amqp.support.converter.MessageConverter messageConverter) voidsetMessageListenerContainerType(String messageListenerContainerType) voidsetMessagePropertiesConverter(MessagePropertiesConverter messagePropertiesConverter) voidsetNoLocal(boolean noLocal) voidsetPrefetchCount(Integer prefetchCount) voidvoidsetRejectAndDontRequeue(boolean rejectAndDontRequeue) voidsetReplyTimeout(long replyTimeout) voidsetRetry(org.springframework.retry.interceptor.RetryOperationsInterceptor retry) voidsetRetryDelay(int retryDelay) voidsetRoutingKey(String routingKey) voidsetSkipBindQueue(boolean skipBindQueue) voidsetSkipDeclareExchange(boolean skipDeclareExchange) voidsetSkipDeclareQueue(boolean skipDeclareQueue) voidsetSynchronous(boolean synchronous) voidsetTestConnectionOnStartup(boolean testConnectionOnStartup) voidsetUsePublisherConnection(boolean usePublisherConnection) Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toStringMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.ComponentAware
getComponent, setComponentMethods inherited from interface org.apache.camel.Endpoint
configureExchange, configureProperties, createAsyncProducer, createExchange, createExchange, getCamelContext, getEndpointBaseUri, getEndpointKey, getEndpointUri, getExchangePattern, isLenientProperties, isRemote, isSingletonProducer, setCamelContextMethods inherited from interface org.apache.camel.IsSingleton
isSingletonMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Field Details
-
ARG_PREFIX
- See Also:
-
CONSUMER_ARG_PREFIX
- See Also:
-
EXCHANGE_ARG_PREFIX
- See Also:
-
QUEUE_ARG_PREFIX
- See Also:
-
BINDING_ARG_PREFIX
- See Also:
-
DLQ_EXCHANGE_ARG_PREFIX
- See Also:
-
DLQ_QUEUE_ARG_PREFIX
- See Also:
-
DLQ_BINDING_PREFIX
- See Also:
-
-
Constructor Details
-
SpringRabbitMQEndpoint
-
-
Method Details
-
getComponent
- Specified by:
getComponentin interfaceorg.apache.camel.ComponentAware- Overrides:
getComponentin classorg.apache.camel.support.DefaultEndpoint
-
doInit
- Overrides:
doInitin classorg.apache.camel.support.DefaultEndpoint- Throws:
Exception
-
getServiceUrl
- Specified by:
getServiceUrlin interfaceorg.apache.camel.spi.EndpointServiceLocation
-
getServiceProtocol
- Specified by:
getServiceProtocolin interfaceorg.apache.camel.spi.EndpointServiceLocation
-
getServiceMetadata
- Specified by:
getServiceMetadatain interfaceorg.apache.camel.spi.EndpointServiceLocation
-
getExchangeName
-
getConnectionFactory
public org.springframework.amqp.rabbit.connection.ConnectionFactory getConnectionFactory() -
setConnectionFactory
public void setConnectionFactory(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory) -
getQueues
-
setQueues
-
isAutoStartup
public boolean isAutoStartup() -
setAutoStartup
public void setAutoStartup(boolean autoStartup) -
isAutoDeclare
public boolean isAutoDeclare() -
setAutoDeclare
public void setAutoDeclare(boolean autoDeclare) -
isAutoDeclareProducer
public boolean isAutoDeclareProducer() -
setAutoDeclareProducer
public void setAutoDeclareProducer(boolean autoDeclareProducer) -
isSkipDeclareExchange
public boolean isSkipDeclareExchange() -
setSkipDeclareExchange
public void setSkipDeclareExchange(boolean skipDeclareExchange) -
isSkipDeclareQueue
public boolean isSkipDeclareQueue() -
setSkipDeclareQueue
public void setSkipDeclareQueue(boolean skipDeclareQueue) -
isSkipBindQueue
public boolean isSkipBindQueue() -
setSkipBindQueue
public void setSkipBindQueue(boolean skipBindQueue) -
isAsyncConsumer
public boolean isAsyncConsumer() -
setAsyncConsumer
public void setAsyncConsumer(boolean asyncConsumer) -
getRoutingKey
-
setRoutingKey
-
isTestConnectionOnStartup
public boolean isTestConnectionOnStartup() -
setTestConnectionOnStartup
public void setTestConnectionOnStartup(boolean testConnectionOnStartup) -
getMessageConverter
public org.springframework.amqp.support.converter.MessageConverter getMessageConverter() -
setMessageConverter
public void setMessageConverter(org.springframework.amqp.support.converter.MessageConverter messageConverter) -
getMessagePropertiesConverter
-
setMessagePropertiesConverter
-
getExchangeType
-
setExchangeType
-
getArgs
-
setArgs
-
getAcknowledgeMode
public org.springframework.amqp.core.AcknowledgeMode getAcknowledgeMode() -
setAcknowledgeMode
public void setAcknowledgeMode(org.springframework.amqp.core.AcknowledgeMode acknowledgeMode) -
isExclusive
public boolean isExclusive() -
setExclusive
public void setExclusive(boolean exclusive) -
isNoLocal
public boolean isNoLocal() -
setNoLocal
public void setNoLocal(boolean noLocal) -
getDeadLetterExchange
-
setDeadLetterExchange
-
getDeadLetterQueue
-
setDeadLetterQueue
-
getDeadLetterRoutingKey
-
setDeadLetterRoutingKey
-
getDeadLetterExchangeType
-
setDeadLetterExchangeType
-
isDisableReplyTo
public boolean isDisableReplyTo() -
setDisableReplyTo
public void setDisableReplyTo(boolean disableReplyTo) -
getReplyTimeout
public long getReplyTimeout() -
setReplyTimeout
public void setReplyTimeout(long replyTimeout) -
getConfirmTimeout
public long getConfirmTimeout() -
setConfirmTimeout
public void setConfirmTimeout(long confirmTimeout) -
getConfirm
-
setConfirm
-
isUsePublisherConnection
public boolean isUsePublisherConnection() -
setUsePublisherConnection
public void setUsePublisherConnection(boolean usePublisherConnection) -
isAllowNullBody
public boolean isAllowNullBody() -
setAllowNullBody
public void setAllowNullBody(boolean allowNullBody) -
isSynchronous
public boolean isSynchronous() -
setSynchronous
public void setSynchronous(boolean synchronous) -
getPrefetchCount
-
setPrefetchCount
-
getMessageListenerContainerType
-
setMessageListenerContainerType
-
getConcurrentConsumers
-
setConcurrentConsumers
-
getMaxConcurrentConsumers
-
setMaxConcurrentConsumers
-
getRetry
public org.springframework.retry.interceptor.RetryOperationsInterceptor getRetry() -
setRetry
public void setRetry(org.springframework.retry.interceptor.RetryOperationsInterceptor retry) -
getMaximumRetryAttempts
public int getMaximumRetryAttempts() -
setMaximumRetryAttempts
public void setMaximumRetryAttempts(int maximumRetryAttempts) -
getRetryDelay
public int getRetryDelay() -
setRetryDelay
public void setRetryDelay(int retryDelay) -
isRejectAndDontRequeue
public boolean isRejectAndDontRequeue() -
setRejectAndDontRequeue
public void setRejectAndDontRequeue(boolean rejectAndDontRequeue) -
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Specified by:
createConsumerin interfaceorg.apache.camel.Endpoint- Throws:
Exception
-
createPollingConsumer
- Specified by:
createPollingConsumerin interfaceorg.apache.camel.Endpoint- Overrides:
createPollingConsumerin classorg.apache.camel.support.DefaultEndpoint- Throws:
Exception
-
createProducer
- Specified by:
createProducerin interfaceorg.apache.camel.Endpoint- Throws:
Exception
-
createExchange
public org.apache.camel.Exchange createExchange(org.springframework.amqp.core.Message message) -
getConsumerArgs
-
getExchangeArgs
-
getQueueArgs
-
getBindingArgs
-
getDlqExchangeArgs
-
getDlqQueueArgs
-
getDlqBindingArgs
-
createInOnlyTemplate
public org.springframework.amqp.rabbit.core.RabbitTemplate createInOnlyTemplate()Factory method for creating a new template for InOnly message exchanges -
createInOutTemplate
public org.springframework.amqp.rabbit.AsyncRabbitTemplate createInOutTemplate()Factory method for creating a new template for InOut message exchanges -
createMessageListenerContainer
public org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer createMessageListenerContainer() -
configureMessageListener
-
parseArgsBoolean
-
parseArgsString
-
declareElements
public void declareElements(org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer container) -
declareElements
public void declareElements(org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer container, org.springframework.amqp.core.AmqpAdmin admin)
-