Interface SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder
- All Superinterfaces:
ComponentBuilder<org.apache.camel.component.springrabbit.SpringRabbitMQComponent>
- All Known Implementing Classes:
SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilderImpl
- Enclosing interface:
- SpringRabbitmqComponentBuilderFactory
public static interface SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder
extends ComponentBuilder<org.apache.camel.component.springrabbit.SpringRabbitMQComponent>
Builder for the Spring RabbitMQ component.
-
Method Summary
Modifier and TypeMethodDescriptionallowNullBody
(boolean allowNullBody) Whether to allow sending messages with no body.amqpAdmin
(org.springframework.amqp.core.AmqpAdmin amqpAdmin) Optional AMQP Admin service to use for auto declaring elements (queues, exchanges, bindings).autoDeclare
(boolean autoDeclare) Specifies whether the consumer should auto declare binding between exchange, queue and routing key when starting.autoStartup
(boolean autoStartup) Specifies whether the consumer container should auto-startup.autowiredEnabled
(boolean autowiredEnabled) Whether autowiring is enabled.bridgeErrorHandler
(boolean bridgeErrorHandler) Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler.concurrentConsumers
(int concurrentConsumers) The number of consumers.connectionFactory
(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory) The connection factory to be use.deadLetterExchange
(String deadLetterExchange) The name of the dead letter exchange.deadLetterExchangeType
(String deadLetterExchangeType) The type of the dead letter exchange.deadLetterQueue
(String deadLetterQueue) The name of the dead letter queue.deadLetterRoutingKey
(String deadLetterRoutingKey) The routing key for the dead letter exchange.errorHandler
(org.springframework.util.ErrorHandler errorHandler) To use a custom ErrorHandler for handling exceptions from the message listener (consumer).headerFilterStrategy
(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy) To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message.ignoreDeclarationExceptions
(boolean ignoreDeclarationExceptions) Switch on ignore exceptions such as mismatched properties when declaring.lazyStartProducer
(boolean lazyStartProducer) Whether the producer should be started lazy (on the first message).listenerContainerFactory
(org.apache.camel.component.springrabbit.ListenerContainerFactory listenerContainerFactory) To use a custom factory for creating and configuring ListenerContainer to be used by the consumer for receiving messages.maxConcurrentConsumers
(Integer maxConcurrentConsumers) The maximum number of consumers (available only with SMLC).maximumRetryAttempts
(int maximumRetryAttempts) How many times a Rabbitmq consumer will retry the same message if Camel failed to process the message.messageConverter
(org.springframework.amqp.support.converter.MessageConverter messageConverter) To use a custom MessageConverter so you can be in control how to map to/from a org.springframework.amqp.core.Message.messageListenerContainerType
(String messageListenerContainerType) The type of the MessageListenerContainer.messagePropertiesConverter
(org.apache.camel.component.springrabbit.MessagePropertiesConverter messagePropertiesConverter) To use a custom MessagePropertiesConverter so you can be in control how to map to/from a org.springframework.amqp.core.MessageProperties.prefetchCount
(int prefetchCount) Tell the broker how many messages to send to each consumer in a single request.rejectAndDontRequeue
(boolean rejectAndDontRequeue) Whether a Rabbitmq consumer should reject the message without requeuing.replyTimeout
(long replyTimeout) Specify the timeout in milliseconds to be used when waiting for a reply message when doing request/reply messaging.retry
(org.springframework.retry.interceptor.RetryOperationsInterceptor retry) Custom retry configuration to use.retryDelay
(int retryDelay) Delay in msec a Rabbitmq consumer will wait before redelivering a message that Camel failed to process.shutdownTimeout
(long shutdownTimeout) The time to wait for workers in milliseconds after the container is stopped.testConnectionOnStartup
(boolean testConnectionOnStartup) Specifies whether to test the connection on startup.Methods inherited from interface org.apache.camel.builder.component.ComponentBuilder
build, build, doSetProperty, register
-
Method Details
-
amqpAdmin
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder amqpAdmin(org.springframework.amqp.core.AmqpAdmin amqpAdmin) Optional AMQP Admin service to use for auto declaring elements (queues, exchanges, bindings). The option is a: <code>org.springframework.amqp.core.AmqpAdmin</code> type. Group: common- Parameters:
amqpAdmin
- the value to set- Returns:
- the dsl builder
-
connectionFactory
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder connectionFactory(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory) The connection factory to be use. A connection factory must be configured either on the component or endpoint. The option is a: <code>org.springframework.amqp.rabbit.connection.ConnectionFactory</code> type. Group: common- Parameters:
connectionFactory
- the value to set- Returns:
- the dsl builder
-
testConnectionOnStartup
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder testConnectionOnStartup(boolean testConnectionOnStartup) Specifies whether to test the connection on startup. This ensures that when Camel starts that all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted then Camel throws an exception on startup. This ensures that Camel is not started with failed connections. The JMS producers is tested as well. The option is a: <code>boolean</code> type. Default: false Group: common- Parameters:
testConnectionOnStartup
- the value to set- Returns:
- the dsl builder
-
autoDeclare
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder autoDeclare(boolean autoDeclare) Specifies whether the consumer should auto declare binding between exchange, queue and routing key when starting. Enabling this can be good for development to make it easy to standup exchanges, queues and bindings on the broker. The option is a: <code>boolean</code> type. Default: false Group: consumer- Parameters:
autoDeclare
- the value to set- Returns:
- the dsl builder
-
autoStartup
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder autoStartup(boolean autoStartup) Specifies whether the consumer container should auto-startup. The option is a: <code>boolean</code> type. Default: true Group: consumer- Parameters:
autoStartup
- the value to set- Returns:
- the dsl builder
-
bridgeErrorHandler
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder bridgeErrorHandler(boolean bridgeErrorHandler) Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option is a: <code>boolean</code> type. Default: false Group: consumer- Parameters:
bridgeErrorHandler
- the value to set- Returns:
- the dsl builder
-
deadLetterExchange
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder deadLetterExchange(String deadLetterExchange) The name of the dead letter exchange. The option is a: <code>java.lang.String</code> type. Group: consumer- Parameters:
deadLetterExchange
- the value to set- Returns:
- the dsl builder
-
deadLetterExchangeType
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder deadLetterExchangeType(String deadLetterExchangeType) The type of the dead letter exchange. The option is a: <code>java.lang.String</code> type. Default: direct Group: consumer- Parameters:
deadLetterExchangeType
- the value to set- Returns:
- the dsl builder
-
deadLetterQueue
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder deadLetterQueue(String deadLetterQueue) The name of the dead letter queue. The option is a: <code>java.lang.String</code> type. Group: consumer- Parameters:
deadLetterQueue
- the value to set- Returns:
- the dsl builder
-
deadLetterRoutingKey
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder deadLetterRoutingKey(String deadLetterRoutingKey) The routing key for the dead letter exchange. The option is a: <code>java.lang.String</code> type. Group: consumer- Parameters:
deadLetterRoutingKey
- the value to set- Returns:
- the dsl builder
-
maximumRetryAttempts
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder maximumRetryAttempts(int maximumRetryAttempts) How many times a Rabbitmq consumer will retry the same message if Camel failed to process the message. The option is a: <code>int</code> type. Default: 5 Group: consumer- Parameters:
maximumRetryAttempts
- the value to set- Returns:
- the dsl builder
-
rejectAndDontRequeue
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder rejectAndDontRequeue(boolean rejectAndDontRequeue) Whether a Rabbitmq consumer should reject the message without requeuing. This enables failed messages to be sent to a Dead Letter Exchange/Queue, if the broker is so configured. The option is a: <code>boolean</code> type. Default: true Group: consumer- Parameters:
rejectAndDontRequeue
- the value to set- Returns:
- the dsl builder
-
retryDelay
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder retryDelay(int retryDelay) Delay in msec a Rabbitmq consumer will wait before redelivering a message that Camel failed to process. The option is a: <code>int</code> type. Default: 1000 Group: consumer- Parameters:
retryDelay
- the value to set- Returns:
- the dsl builder
-
concurrentConsumers
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder concurrentConsumers(int concurrentConsumers) The number of consumers. The option is a: <code>int</code> type. Default: 1 Group: consumer (advanced)- Parameters:
concurrentConsumers
- the value to set- Returns:
- the dsl builder
-
errorHandler
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder errorHandler(org.springframework.util.ErrorHandler errorHandler) To use a custom ErrorHandler for handling exceptions from the message listener (consumer). The option is a: <code>org.springframework.util.ErrorHandler</code> type. Group: consumer (advanced)- Parameters:
errorHandler
- the value to set- Returns:
- the dsl builder
-
listenerContainerFactory
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder listenerContainerFactory(org.apache.camel.component.springrabbit.ListenerContainerFactory listenerContainerFactory) To use a custom factory for creating and configuring ListenerContainer to be used by the consumer for receiving messages. The option is a: <code>org.apache.camel.component.springrabbit.ListenerContainerFactory</code> type. Group: consumer (advanced)- Parameters:
listenerContainerFactory
- the value to set- Returns:
- the dsl builder
-
maxConcurrentConsumers
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder maxConcurrentConsumers(Integer maxConcurrentConsumers) The maximum number of consumers (available only with SMLC). The option is a: <code>java.lang.Integer</code> type. Group: consumer (advanced)- Parameters:
maxConcurrentConsumers
- the value to set- Returns:
- the dsl builder
-
messageListenerContainerType
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder messageListenerContainerType(String messageListenerContainerType) The type of the MessageListenerContainer. The option is a: <code>java.lang.String</code> type. Default: DMLC Group: consumer (advanced)- Parameters:
messageListenerContainerType
- the value to set- Returns:
- the dsl builder
-
prefetchCount
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder prefetchCount(int prefetchCount) Tell the broker how many messages to send to each consumer in a single request. Often this can be set quite high to improve throughput. The option is a: <code>int</code> type. Default: 250 Group: consumer (advanced)- Parameters:
prefetchCount
- the value to set- Returns:
- the dsl builder
-
retry
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder retry(org.springframework.retry.interceptor.RetryOperationsInterceptor retry) Custom retry configuration to use. If this is configured then the other settings such as maximumRetryAttempts for retry are not in use. The option is a: <code>org.springframework.retry.interceptor.RetryOperationsInterceptor</code> type. Group: consumer (advanced)- Parameters:
retry
- the value to set- Returns:
- the dsl builder
-
shutdownTimeout
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder shutdownTimeout(long shutdownTimeout) The time to wait for workers in milliseconds after the container is stopped. If any workers are active when the shutdown signal comes they will be allowed to finish processing as long as they can finish within this timeout. The option is a: <code>long</code> type. Default: 5000 Group: consumer (advanced)- Parameters:
shutdownTimeout
- the value to set- Returns:
- the dsl builder
-
allowNullBody
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder allowNullBody(boolean allowNullBody) Whether to allow sending messages with no body. If this option is false and the message body is null, then an MessageConversionException is thrown. The option is a: <code>boolean</code> type. Default: false Group: producer- Parameters:
allowNullBody
- the value to set- Returns:
- the dsl builder
-
lazyStartProducer
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder lazyStartProducer(boolean lazyStartProducer) Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The option is a: <code>boolean</code> type. Default: false Group: producer- Parameters:
lazyStartProducer
- the value to set- Returns:
- the dsl builder
-
replyTimeout
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder replyTimeout(long replyTimeout) Specify the timeout in milliseconds to be used when waiting for a reply message when doing request/reply messaging. The default value is 5 seconds. A negative value indicates an indefinite timeout. The option is a: <code>long</code> type. Default: 5000 Group: producer- Parameters:
replyTimeout
- the value to set- Returns:
- the dsl builder
-
autowiredEnabled
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder autowiredEnabled(boolean autowiredEnabled) Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. The option is a: <code>boolean</code> type. Default: true Group: advanced- Parameters:
autowiredEnabled
- the value to set- Returns:
- the dsl builder
-
ignoreDeclarationExceptions
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder ignoreDeclarationExceptions(boolean ignoreDeclarationExceptions) Switch on ignore exceptions such as mismatched properties when declaring. The option is a: <code>boolean</code> type. Default: false Group: advanced- Parameters:
ignoreDeclarationExceptions
- the value to set- Returns:
- the dsl builder
-
messageConverter
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder messageConverter(org.springframework.amqp.support.converter.MessageConverter messageConverter) To use a custom MessageConverter so you can be in control how to map to/from a org.springframework.amqp.core.Message. The option is a: <code>org.springframework.amqp.support.converter.MessageConverter</code> type. Group: advanced- Parameters:
messageConverter
- the value to set- Returns:
- the dsl builder
-
messagePropertiesConverter
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder messagePropertiesConverter(org.apache.camel.component.springrabbit.MessagePropertiesConverter messagePropertiesConverter) To use a custom MessagePropertiesConverter so you can be in control how to map to/from a org.springframework.amqp.core.MessageProperties. The option is a: <code>org.apache.camel.component.springrabbit.MessagePropertiesConverter</code> type. Group: advanced- Parameters:
messagePropertiesConverter
- the value to set- Returns:
- the dsl builder
-
headerFilterStrategy
default SpringRabbitmqComponentBuilderFactory.SpringRabbitmqComponentBuilder headerFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy) To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message. The option is a: <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. Group: filter- Parameters:
headerFilterStrategy
- the value to set- Returns:
- the dsl builder
-