Class RabbitMQEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.component.rabbitmq.RabbitMQEndpoint
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.AsyncEndpoint
,org.apache.camel.CamelContextAware
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasId
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="2.12.0",
scheme="rabbitmq",
title="RabbitMQ",
syntax="rabbitmq:exchangeName",
category=MESSAGING,
headersClass=RabbitMQConstants.class)
public class RabbitMQEndpoint
extends org.apache.camel.support.DefaultEndpoint
implements org.apache.camel.AsyncEndpoint
Send and receive messages from RabbitMQ instances.
-
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionRabbitMQEndpoint
(String endpointUri, RabbitMQComponent component) RabbitMQEndpoint
(String endpointUri, RabbitMQComponent component, com.rabbitmq.client.ConnectionFactory connectionFactory) -
Method Summary
Modifier and TypeMethodDescriptioncom.rabbitmq.client.Connection
connect
(ExecutorService executor) org.apache.camel.Consumer
createConsumer
(org.apache.camel.Processor processor) protected ExecutorService
org.apache.camel.Producer
org.apache.camel.Exchange
createRabbitExchange
(com.rabbitmq.client.Envelope envelope, com.rabbitmq.client.AMQP.BasicProperties properties, byte[] body) protected ScheduledExecutorService
void
declareExchangeAndQueue
(com.rabbitmq.client.Channel channel) If needed, declare Exchange, declare Queue and bind them with Routing KeygetArgs()
int
Get maximum number of opened channel in poollong
int
com.rabbitmq.client.ConnectionFactory
com.rabbitmq.client.ExceptionHandler
int
protected RabbitMQMessageConverter
Gets the message converter to convert between rabbit and camelint
int
int
long
The amount of time in milliseconds to wait for a basic.ack response from RabbitMQ servergetQueue()
Gets the Queue to reply to if you dont want to use temporary reply queuesGet replyToType for inOut exchangeint
int
int
long
long
int
getVhost()
boolean
boolean
boolean
Allow pass null values to headerboolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
When true, an exception will be thrown when the message cannot be delivered (basic.return) and the message is marked as mandatory.boolean
boolean
boolean
boolean
boolean
boolean
When true, the message will be published with publisher acknowledgements turned onboolean
Decides whether an exception during declaration of exchanges or queues is recoverable or not.boolean
This is used by the consumer to control rejection of the message.boolean
boolean
boolean
If true the queue will not be bound to the exchange after declaring itboolean
boolean
boolean
Get useMessageIDAsCorrelationID for inOut exchangecom.rabbitmq.client.Address[]
void
publishExchangeToChannel
(org.apache.camel.Exchange camelExchange, com.rabbitmq.client.Channel channel, String routingKey) Sends the body that is on the exchangevoid
setAdditionalHeaders
(Map<String, Object> additionalHeaders) Map of additional headers.void
setAdditionalProperties
(Map<String, Object> additionalProperties) Map of additional properties.void
setAddresses
(String addresses) If this option is set, camel-rabbitmq will try to create connection based on the setting of option addresses.void
setAllowCustomHeaders
(boolean allowCustomHeaders) Allow pass custom values to headervoid
setAllowMessageBodySerialization
(boolean allowMessageBodySerialization) Whether to allow Java serialization of the message body or not.void
setAllowNullHeaders
(boolean allowNullHeaders) void
Specify arguments for configuring the different RabbitMQ concepts, a different prefix is required for each: Exchange: arg.exchange. Queue: arg.queue. Binding: arg.binding. DLQ: arg.dlq.queue. DLQ binding: arg.dlq.binding. For example to declare a queue with message ttl argument: http://localhost:5672/exchange/queue?args=arg.queue.x-message-ttl=60000void
setAutoAck
(boolean autoAck) If messages should be auto acknowledgedvoid
setAutoDelete
(boolean autoDelete) If it is true, the exchange will be deleted when it is no longer in usevoid
setAutomaticRecoveryEnabled
(Boolean automaticRecoveryEnabled) Enables connection automatic recovery (uses connection implementation that performs automatic recovery when existing connection has failures)void
setBridgeEndpoint
(boolean bridgeEndpoint) If the bridgeEndpoint is true, the producer will ignore the message header of "rabbitmq.EXCHANGE_NAME" and "rabbitmq.ROUTING_KEY"void
setChannelPoolMaxSize
(int channelPoolMaxSize) void
setChannelPoolMaxWait
(long channelPoolMaxWait) Set the maximum number of milliseconds to wait for a channel from the poolvoid
setClientProperties
(Map<String, Object> clientProperties) Connection client properties (client info used in negotiating with the server)void
setConcurrentConsumers
(int concurrentConsumers) Number of concurrent consumers when consuming from broker.void
setConnectionFactory
(com.rabbitmq.client.ConnectionFactory connectionFactory) To use a custom RabbitMQ connection factory.void
setConnectionFactoryExceptionHandler
(com.rabbitmq.client.ExceptionHandler connectionFactoryExceptionHandler) Custom rabbitmq ExceptionHandler for ConnectionFactoryvoid
setConnectionTimeout
(int connectionTimeout) Connection timeoutvoid
setConsumerTag
(String consumerTag) Specify a client-generated consumer tag to establish context when invoking the consume operationvoid
setDeadLetterExchange
(String deadLetterExchange) The name of the dead letter exchangevoid
setDeadLetterExchangeType
(String deadLetterExchangeType) The type of the dead letter exchangevoid
setDeadLetterQueue
(String deadLetterQueue) The name of the dead letter queuevoid
setDeadLetterRoutingKey
(String deadLetterRoutingKey) The routing key for the dead letter exchangevoid
setDeclare
(boolean declare) If the option is true, camel declare the exchange and queue name and bind them together.void
setDurable
(boolean durable) If we are declaring a durable exchange (the exchange will survive a server restart)void
setExchangeName
(String exchangeName) The exchange name determines the exchange to which the produced messages will be sent to.void
setExchangeType
(String exchangeType) The exchange type such as direct or topic.void
setExclusive
(boolean exclusive) Exclusive queues may only be accessed by the current connection, and are deleted when that connection closes.void
setExclusiveConsumer
(boolean exclusiveConsumer) Request exclusive access to the queue (meaning only this consumer can access the queue).void
setGuaranteedDeliveries
(boolean guaranteedDeliveries) void
setHostname
(String hostname) The hostname of the running rabbitmq instance or cluster.void
setImmediate
(boolean immediate) This flag tells the server how to react if the message cannot be routed to a queue consumer immediately.void
setMandatory
(boolean mandatory) This flag tells the server how to react if the message cannot be routed to a queue.void
setNetworkRecoveryInterval
(Integer networkRecoveryInterval) Network recovery interval in milliseconds (interval used when recovering from network failure)void
setPassive
(boolean passive) Passive queues depend on the queue already to be available at RabbitMQ.void
setPassword
(String password) Password for authenticated accessvoid
setPortNumber
(int portNumber) Port number for the host with the running rabbitmq instance or cluster.void
setPrefetchCount
(int prefetchCount) The maximum number of messages that the server will deliver, 0 if unlimited.void
setPrefetchEnabled
(boolean prefetchEnabled) Enables the quality of service on the RabbitMQConsumer side.void
setPrefetchGlobal
(boolean prefetchGlobal) If the settings should be applied to the entire channel rather than each consumer You need to specify the option of prefetchSize, prefetchCount, prefetchGlobal at the same timevoid
setPrefetchSize
(int prefetchSize) The maximum amount of content (measured in octets) that the server will deliver, 0 if unlimited.void
setPublisherAcknowledgements
(boolean publisherAcknowledgements) void
setPublisherAcknowledgementsTimeout
(long publisherAcknowledgementsTimeout) void
The queue to receive messages fromvoid
setRecoverFromDeclareException
(boolean recoverFromDeclareException) void
setRequestedChannelMax
(int requestedChannelMax) Connection requested channel max (max number of channels offered)void
setRequestedFrameMax
(int requestedFrameMax) Connection requested frame max (max size of frame offered)void
setRequestedHeartbeat
(int requestedHeartbeat) Connection requested heartbeat (heart-beat in seconds offered)void
setRequestTimeout
(long requestTimeout) Set timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds)void
setRequestTimeoutCheckerInterval
(long requestTimeoutCheckerInterval) Set requestTimeoutCheckerInterval for inOut exchangevoid
setReQueue
(boolean reQueue) void
setRoutingKey
(String routingKey) The routing key to use when binding a consumer queue to the exchange.void
setSkipDlqDeclare
(boolean skipDlqDeclare) If true the producer will not declare and bind a dead letter queue.void
setSkipExchangeDeclare
(boolean skipExchangeDeclare) This can be used if we need to declare the queue but not the exchangevoid
setSkipQueueBind
(boolean skipQueueBind) void
setSkipQueueDeclare
(boolean skipQueueDeclare) If true the producer will not declare and bind a queue.void
setSslProtocol
(String sslProtocol) Enables SSL on connection, accepted value are `true`, `TLS` and 'SSLv3`void
setThreadPoolSize
(int threadPoolSize) The consumer uses a Thread Pool Executor with a fixed number of threads.void
setTopologyRecoveryEnabled
(Boolean topologyRecoveryEnabled) Enables connection topology recovery (should topology recovery be performed?)void
setTransferException
(boolean transferException) When true and an inOut Exchange failed on the consumer side send the caused Exception back in the responsevoid
setTrustManager
(TrustManager trustManager) Configure SSL trust manager, SSL should be enabled for this option to be effectivevoid
setUsername
(String username) Username in case of authenticated accessvoid
The vhost for the channelMethods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStart, doStop, equals, getCamelContext, getComponent, 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, toString
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.camel.Endpoint
configureExchange, configureProperties, createAsyncProducer, createExchange, createExchange, createPollingConsumer, getCamelContext, getEndpointBaseUri, getEndpointKey, getEndpointUri, getExchangePattern, isLenientProperties, isSingletonProducer, setCamelContext
Methods inherited from interface org.apache.camel.IsSingleton
isSingleton
Methods inherited from interface org.apache.camel.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Field Details
-
SERIALIZE_HEADER
- See Also:
-
-
Constructor Details
-
RabbitMQEndpoint
public RabbitMQEndpoint() -
RabbitMQEndpoint
-
RabbitMQEndpoint
public RabbitMQEndpoint(String endpointUri, RabbitMQComponent component, com.rabbitmq.client.ConnectionFactory connectionFactory)
-
-
Method Details
-
createRabbitExchange
public org.apache.camel.Exchange createRabbitExchange(com.rabbitmq.client.Envelope envelope, com.rabbitmq.client.AMQP.BasicProperties properties, byte[] body) -
getMessageConverter
Gets the message converter to convert between rabbit and camel -
publishExchangeToChannel
public void publishExchangeToChannel(org.apache.camel.Exchange camelExchange, com.rabbitmq.client.Channel channel, String routingKey) throws IOException Sends the body that is on the exchange- Throws:
IOException
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Specified by:
createConsumer
in interfaceorg.apache.camel.Endpoint
- Throws:
Exception
-
connect
public com.rabbitmq.client.Connection connect(ExecutorService executor) throws IOException, TimeoutException - Throws:
IOException
TimeoutException
-
declareExchangeAndQueue
If needed, declare Exchange, declare Queue and bind them with Routing Key- Throws:
IOException
-
createProducer
- Specified by:
createProducer
in interfaceorg.apache.camel.Endpoint
- Throws:
Exception
-
createExecutor
-
createScheduledExecutor
-
getUsername
-
setUsername
Username in case of authenticated access -
getPassword
-
setPassword
Password for authenticated access -
getVhost
-
setVhost
The vhost for the channel -
getHostname
-
setHostname
The hostname of the running rabbitmq instance or cluster. -
getThreadPoolSize
public int getThreadPoolSize() -
setThreadPoolSize
public void setThreadPoolSize(int threadPoolSize) The consumer uses a Thread Pool Executor with a fixed number of threads. This setting allows you to set that number of threads. -
getPortNumber
public int getPortNumber() -
setPortNumber
public void setPortNumber(int portNumber) Port number for the host with the running rabbitmq instance or cluster. Default value is 5672. -
isAutoAck
public boolean isAutoAck() -
setAutoAck
public void setAutoAck(boolean autoAck) If messages should be auto acknowledged -
isAutoDelete
public boolean isAutoDelete() -
setAutoDelete
public void setAutoDelete(boolean autoDelete) If it is true, the exchange will be deleted when it is no longer in use -
isDurable
public boolean isDurable() -
setDurable
public void setDurable(boolean durable) If we are declaring a durable exchange (the exchange will survive a server restart) -
getQueue
-
setQueue
The queue to receive messages from -
getExchangeName
-
setExchangeName
The exchange name determines the exchange to which the produced messages will be sent to. In the case of consumers, the exchange name determines the exchange the queue will be bound to. -
getExchangeType
-
setExchangeType
The exchange type such as direct or topic. -
getRoutingKey
-
setRoutingKey
The routing key to use when binding a consumer queue to the exchange. For producer routing keys, you set the header rabbitmq.ROUTING_KEY. -
setSkipQueueDeclare
public void setSkipQueueDeclare(boolean skipQueueDeclare) If true the producer will not declare and bind a queue. This can be used for directing messages via an existing routing key. -
isSkipQueueDeclare
public boolean isSkipQueueDeclare() -
setSkipDlqDeclare
public void setSkipDlqDeclare(boolean skipDlqDeclare) If true the producer will not declare and bind a dead letter queue. This can be used if you have also DLQ rabbitmq consumer and you want to avoid argument clashing between Producer and Consumer. This option have no effect, if DLQ configured (deadLetterExchange option is not set). -
isSkipDlqDeclare
public boolean isSkipDlqDeclare() -
isSkipQueueBind
public boolean isSkipQueueBind()If true the queue will not be bound to the exchange after declaring it -
setSkipQueueBind
public void setSkipQueueBind(boolean skipQueueBind) -
setSkipExchangeDeclare
public void setSkipExchangeDeclare(boolean skipExchangeDeclare) This can be used if we need to declare the queue but not the exchange -
isSkipExchangeDeclare
public boolean isSkipExchangeDeclare() -
setBridgeEndpoint
public void setBridgeEndpoint(boolean bridgeEndpoint) If the bridgeEndpoint is true, the producer will ignore the message header of "rabbitmq.EXCHANGE_NAME" and "rabbitmq.ROUTING_KEY" -
isBridgeEndpoint
public boolean isBridgeEndpoint() -
setAddresses
If this option is set, camel-rabbitmq will try to create connection based on the setting of option addresses. The addresses value is a string which looks like "server1:12345, server2:12345" -
getAddresses
-
parseAddresses
public com.rabbitmq.client.Address[] parseAddresses() -
getConnectionTimeout
public int getConnectionTimeout() -
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout) Connection timeout -
getRequestedChannelMax
public int getRequestedChannelMax() -
setRequestedChannelMax
public void setRequestedChannelMax(int requestedChannelMax) Connection requested channel max (max number of channels offered) -
getRequestedFrameMax
public int getRequestedFrameMax() -
setRequestedFrameMax
public void setRequestedFrameMax(int requestedFrameMax) Connection requested frame max (max size of frame offered) -
getRequestedHeartbeat
public int getRequestedHeartbeat() -
setRequestedHeartbeat
public void setRequestedHeartbeat(int requestedHeartbeat) Connection requested heartbeat (heart-beat in seconds offered) -
getSslProtocol
-
setSslProtocol
Enables SSL on connection, accepted value are `true`, `TLS` and 'SSLv3` -
getConnectionFactory
public com.rabbitmq.client.ConnectionFactory getConnectionFactory() -
setConnectionFactory
public void setConnectionFactory(com.rabbitmq.client.ConnectionFactory connectionFactory) To use a custom RabbitMQ connection factory. When this option is set, all connection options (connectionTimeout, requestedChannelMax...) set on URI are not used -
getTrustManager
-
setTrustManager
Configure SSL trust manager, SSL should be enabled for this option to be effective -
getClientProperties
-
setClientProperties
Connection client properties (client info used in negotiating with the server) -
getAutomaticRecoveryEnabled
-
setAutomaticRecoveryEnabled
Enables connection automatic recovery (uses connection implementation that performs automatic recovery when existing connection has failures) -
isAllowMessageBodySerialization
public boolean isAllowMessageBodySerialization() -
setAllowMessageBodySerialization
public void setAllowMessageBodySerialization(boolean allowMessageBodySerialization) Whether to allow Java serialization of the message body or not. If this value is true, the message body will be serialized on the producer side using Java serialization, if no type converter can handle the message body. On the consumer side, it will deserialize the message body if this value is true and the message contains a CamelSerialize header. Setting this value to true may introduce a security vulnerability as it allows an attacker to attempt to deserialize to a gadget object which could result in a RCE or other security vulnerability. -
getNetworkRecoveryInterval
-
setNetworkRecoveryInterval
Network recovery interval in milliseconds (interval used when recovering from network failure) -
getTopologyRecoveryEnabled
-
setTopologyRecoveryEnabled
Enables connection topology recovery (should topology recovery be performed?) -
isPrefetchEnabled
public boolean isPrefetchEnabled() -
setPrefetchEnabled
public void setPrefetchEnabled(boolean prefetchEnabled) Enables the quality of service on the RabbitMQConsumer side. You need to specify the option of prefetchSize, prefetchCount, prefetchGlobal at the same time -
setPrefetchSize
public void setPrefetchSize(int prefetchSize) The maximum amount of content (measured in octets) that the server will deliver, 0 if unlimited. You need to specify the option of prefetchSize, prefetchCount, prefetchGlobal at the same time -
getPrefetchSize
public int getPrefetchSize() -
setPrefetchCount
public void setPrefetchCount(int prefetchCount) The maximum number of messages that the server will deliver, 0 if unlimited. You need to specify the option of prefetchSize, prefetchCount, prefetchGlobal at the same time -
getPrefetchCount
public int getPrefetchCount() -
setPrefetchGlobal
public void setPrefetchGlobal(boolean prefetchGlobal) If the settings should be applied to the entire channel rather than each consumer You need to specify the option of prefetchSize, prefetchCount, prefetchGlobal at the same time -
isPrefetchGlobal
public boolean isPrefetchGlobal() -
getConcurrentConsumers
public int getConcurrentConsumers() -
setConcurrentConsumers
public void setConcurrentConsumers(int concurrentConsumers) Number of concurrent consumers when consuming from broker. (eg similar as to the same option for the JMS component). -
isDeclare
public boolean isDeclare() -
isRecoverFromDeclareException
public boolean isRecoverFromDeclareException()Decides whether an exception during declaration of exchanges or queues is recoverable or not. If the option is false, camel will throw an exception when starting the consumer, which will interrupt application startup (e.g. in the case when the exchange / queue is already declared in RabbitMQ and has incompatible configuration). If set to true, the consumer will try to reconnect periodically. -
setRecoverFromDeclareException
public void setRecoverFromDeclareException(boolean recoverFromDeclareException) -
setDeclare
public void setDeclare(boolean declare) If the option is true, camel declare the exchange and queue name and bind them together. If the option is false, camel won't declare the exchange and queue name on the server. -
getDeadLetterExchange
-
setDeadLetterExchange
The name of the dead letter exchange -
getDeadLetterQueue
-
setDeadLetterQueue
The name of the dead letter queue -
getDeadLetterRoutingKey
-
setDeadLetterRoutingKey
The routing key for the dead letter exchange -
getDeadLetterExchangeType
-
setDeadLetterExchangeType
The type of the dead letter exchange -
getChannelPoolMaxSize
public int getChannelPoolMaxSize()Get maximum number of opened channel in pool -
setChannelPoolMaxSize
public void setChannelPoolMaxSize(int channelPoolMaxSize) -
getChannelPoolMaxWait
public long getChannelPoolMaxWait() -
setChannelPoolMaxWait
public void setChannelPoolMaxWait(long channelPoolMaxWait) Set the maximum number of milliseconds to wait for a channel from the pool -
isMandatory
public boolean isMandatory() -
setMandatory
public void setMandatory(boolean mandatory) This flag tells the server how to react if the message cannot be routed to a queue. If this flag is set, the server will return an unroutable message with a Return method. If this flag is zero, the server silently drops the message. If the header is present rabbitmq.MANDATORY it will override this option. -
isImmediate
public boolean isImmediate() -
setImmediate
public void setImmediate(boolean immediate) This flag tells the server how to react if the message cannot be routed to a queue consumer immediately. If this flag is set, the server will return an undeliverable message with a Return method. If this flag is zero, the server will queue the message, but with no guarantee that it will ever be consumed. If the header is present rabbitmq.IMMEDIATE it will override this option. -
setArgs
Specify arguments for configuring the different RabbitMQ concepts, a different prefix is required for each:- Exchange: arg.exchange.
- Queue: arg.queue.
- Binding: arg.binding.
- DLQ: arg.dlq.queue.
- DLQ binding: arg.dlq.binding.
-
getArgs
-
getExchangeArgs
-
getQueueArgs
-
getDlqArgs
-
getDlqBindingArgs
-
getBindingArgs
-
setRequestTimeout
public void setRequestTimeout(long requestTimeout) Set timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds) -
getRequestTimeout
public long getRequestTimeout() -
setRequestTimeoutCheckerInterval
public void setRequestTimeoutCheckerInterval(long requestTimeoutCheckerInterval) Set requestTimeoutCheckerInterval for inOut exchange -
getRequestTimeoutCheckerInterval
public long getRequestTimeoutCheckerInterval() -
isUseMessageIDAsCorrelationID
public boolean isUseMessageIDAsCorrelationID()Get useMessageIDAsCorrelationID for inOut exchange -
setTransferException
public void setTransferException(boolean transferException) When true and an inOut Exchange failed on the consumer side send the caused Exception back in the response -
isTransferException
public boolean isTransferException() -
isPublisherAcknowledgements
public boolean isPublisherAcknowledgements()When true, the message will be published with publisher acknowledgements turned on -
setPublisherAcknowledgements
public void setPublisherAcknowledgements(boolean publisherAcknowledgements) -
getPublisherAcknowledgementsTimeout
public long getPublisherAcknowledgementsTimeout()The amount of time in milliseconds to wait for a basic.ack response from RabbitMQ server -
setPublisherAcknowledgementsTimeout
public void setPublisherAcknowledgementsTimeout(long publisherAcknowledgementsTimeout) -
isGuaranteedDeliveries
public boolean isGuaranteedDeliveries()When true, an exception will be thrown when the message cannot be delivered (basic.return) and the message is marked as mandatory. PublisherAcknowledgement will also be activated in this case. See also <a href=https://www.rabbitmq.com/confirms.html">publisher acknowledgements - When will messages be confirmed. -
setGuaranteedDeliveries
public void setGuaranteedDeliveries(boolean guaranteedDeliveries) -
getReplyToType
Get replyToType for inOut exchange -
getReplyTo
Gets the Queue to reply to if you dont want to use temporary reply queues -
isExclusive
public boolean isExclusive() -
setExclusive
public void setExclusive(boolean exclusive) Exclusive queues may only be accessed by the current connection, and are deleted when that connection closes. -
isExclusiveConsumer
public boolean isExclusiveConsumer() -
setExclusiveConsumer
public void setExclusiveConsumer(boolean exclusiveConsumer) Request exclusive access to the queue (meaning only this consumer can access the queue). This is useful when you want a long-lived shared queue to be temporarily accessible by just one consumer. -
isAllowNullHeaders
public boolean isAllowNullHeaders()Allow pass null values to header -
setAllowNullHeaders
public void setAllowNullHeaders(boolean allowNullHeaders) -
isPassive
public boolean isPassive() -
setPassive
public void setPassive(boolean passive) Passive queues depend on the queue already to be available at RabbitMQ. -
getConsumerTag
-
setConsumerTag
Specify a client-generated consumer tag to establish context when invoking the consume operation -
isAllowCustomHeaders
public boolean isAllowCustomHeaders() -
setAdditionalHeaders
Map of additional headers. These headers will be set only when the 'allowCustomHeaders' is set to true -
getAdditionalHeaders
-
setAdditionalProperties
Map of additional properties. These are standard RabbitMQ properties as defined inAMQP.BasicProperties
. The map keys should be fromRabbitMQConstants
. Any other keys will be ignored. -
getAdditionalProperties
-
setAllowCustomHeaders
public void setAllowCustomHeaders(boolean allowCustomHeaders) Allow pass custom values to header -
getConnectionFactoryExceptionHandler
public com.rabbitmq.client.ExceptionHandler getConnectionFactoryExceptionHandler() -
setConnectionFactoryExceptionHandler
public void setConnectionFactoryExceptionHandler(com.rabbitmq.client.ExceptionHandler connectionFactoryExceptionHandler) Custom rabbitmq ExceptionHandler for ConnectionFactory -
isReQueue
public boolean isReQueue()This is used by the consumer to control rejection of the message. When the consumer is complete processing the exchange, and if the exchange failed, then the consumer is going to reject the message from the RabbitMQ broker. If the header CamelRabbitmqRequeue is present then the value of the header will be used, otherwise this endpoint value is used as fallback. If the value is false (by default) then the message is discarded/dead-lettered. If the value is true, then the message is re-queued. -
setReQueue
public void setReQueue(boolean reQueue)
-