Interface PulsarComponentBuilderFactory.PulsarComponentBuilder
- All Superinterfaces:
ComponentBuilder<org.apache.camel.component.pulsar.PulsarComponent>
- All Known Implementing Classes:
PulsarComponentBuilderFactory.PulsarComponentBuilderImpl
- Enclosing interface:
- PulsarComponentBuilderFactory
public static interface PulsarComponentBuilderFactory.PulsarComponentBuilder
extends ComponentBuilder<org.apache.camel.component.pulsar.PulsarComponent>
Builder for the Pulsar component.
-
Method Summary
Modifier and TypeMethodDescriptionackGroupTimeMillis
(long ackGroupTimeMillis) Group the consumer acknowledgments for the specified time in milliseconds - defaults to 100.ackTimeoutMillis
(long ackTimeoutMillis) Timeout for unacknowledged messages in milliseconds - defaults to 10000.ackTimeoutRedeliveryBackoff
(org.apache.pulsar.client.api.RedeliveryBackoff ackTimeoutRedeliveryBackoff) RedeliveryBackoff to use for ack timeout redelivery backoff.allowManualAcknowledgement
(boolean allowManualAcknowledgement) Whether to allow manual message acknowledgements.authenticationClass
(String authenticationClass) The Authentication FQCN to be used while creating the client from URI.authenticationParams
(String authenticationParams) The Authentication Parameters to be used while creating the client from URI.autoConfiguration
(org.apache.camel.component.pulsar.utils.AutoConfiguration autoConfiguration) The pulsar auto configuration.autowiredEnabled
(boolean autowiredEnabled) Whether autowiring is enabled.batcherBuilder
(org.apache.pulsar.client.api.BatcherBuilder batcherBuilder) Control batching method used by the producer.batchingEnabled
(boolean batchingEnabled) Control whether automatic batching of messages is enabled for the producer.batchingMaxMessages
(int batchingMaxMessages) The maximum size to batch messages.batchingMaxPublishDelayMicros
(long batchingMaxPublishDelayMicros) The maximum time period within which the messages sent will be batched if batchingEnabled is true.blockIfQueueFull
(boolean blockIfQueueFull) Whether to block the producing thread if pending messages queue is full or to throw a ProducerQueueIsFullError.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.chunkingEnabled
(boolean chunkingEnabled) Control whether chunking of messages is enabled for the producer.compressionType
(org.apache.pulsar.client.api.CompressionType compressionType) Compression type to use.configuration
(org.apache.camel.component.pulsar.PulsarConfiguration configuration) Allows to pre-configure the Pulsar component with common options that the endpoints will reuse.consumerName
(String consumerName) Name of the consumer when subscription is EXCLUSIVE.consumerNamePrefix
(String consumerNamePrefix) Prefix to add to consumer names when a SHARED or FAILOVER subscription is used.consumerQueueSize
(int consumerQueueSize) Size of the consumer queue - defaults to 10.deadLetterTopic
(String deadLetterTopic) Name of the topic where the messages which fail maxRedeliverCount times will be sent.initialSequenceId
(long initialSequenceId) The first message published will have a sequence Id of initialSequenceId 1.lazyStartProducer
(boolean lazyStartProducer) Whether the producer should be started lazy (on the first message).maxPendingMessages
(int maxPendingMessages) Size of the pending massages queue.maxPendingMessagesAcrossPartitions
(int maxPendingMessagesAcrossPartitions) Deprecated.maxRedeliverCount
(Integer maxRedeliverCount) Maximum number of times that a message will be redelivered before being sent to the dead letter queue.messageListener
(boolean messageListener) Whether to use the messageListener interface, or to receive messages using a separate thread pool.messageRouter
(org.apache.pulsar.client.api.MessageRouter messageRouter) Custom Message Router to use.messageRoutingMode
(org.apache.pulsar.client.api.MessageRoutingMode messageRoutingMode) Message Routing Mode to use.negativeAckRedeliveryBackoff
(org.apache.pulsar.client.api.RedeliveryBackoff negativeAckRedeliveryBackoff) RedeliveryBackoff to use for negative ack redelivery backoff.negativeAckRedeliveryDelayMicros
(long negativeAckRedeliveryDelayMicros) Set the negative acknowledgement delay.numberOfConsumers
(int numberOfConsumers) Number of consumers - defaults to 1.numberOfConsumerThreads
(int numberOfConsumerThreads) Number of threads to receive and handle messages when using a separate thread pool.producerName
(String producerName) Name of the producer.pulsarClient
(org.apache.pulsar.client.api.PulsarClient pulsarClient) The pulsar client.pulsarMessageReceiptFactory
(org.apache.camel.component.pulsar.PulsarMessageReceiptFactory pulsarMessageReceiptFactory) Provide a factory to create an alternate implementation of PulsarMessageReceipt.readCompacted
(boolean readCompacted) Enable compacted topic reading.sendTimeoutMs
(int sendTimeoutMs) Send timeout in milliseconds.serviceUrl
(String serviceUrl) The Pulsar Service URL to point while creating the client from URI.subscriptionInitialPosition
(org.apache.camel.component.pulsar.utils.consumers.SubscriptionInitialPosition subscriptionInitialPosition) Control the initial position in the topic of a newly created subscription.subscriptionName
(String subscriptionName) Name of the subscription to use.subscriptionTopicsMode
(org.apache.pulsar.client.api.RegexSubscriptionMode subscriptionTopicsMode) Determines to which topics this consumer should be subscribed to - Persistent, Non-Persistent, or both.subscriptionType
(org.apache.camel.component.pulsar.utils.consumers.SubscriptionType subscriptionType) Type of the subscription EXCLUSIVESHAREDFAILOVERKEY_SHARED, defaults to EXCLUSIVE.topicsPattern
(boolean topicsPattern) Whether the topic is a pattern (regular expression) that allows the consumer to subscribe to all matching topics in the namespace.Methods inherited from interface org.apache.camel.builder.component.ComponentBuilder
build, build, doSetProperty, register
-
Method Details
-
authenticationClass
default PulsarComponentBuilderFactory.PulsarComponentBuilder authenticationClass(String authenticationClass) The Authentication FQCN to be used while creating the client from URI. The option is a: <code>java.lang.String</code> type. Group: common- Parameters:
authenticationClass
- the value to set- Returns:
- the dsl builder
-
authenticationParams
default PulsarComponentBuilderFactory.PulsarComponentBuilder authenticationParams(String authenticationParams) The Authentication Parameters to be used while creating the client from URI. The option is a: <code>java.lang.String</code> type. Group: common- Parameters:
authenticationParams
- the value to set- Returns:
- the dsl builder
-
configuration
default PulsarComponentBuilderFactory.PulsarComponentBuilder configuration(org.apache.camel.component.pulsar.PulsarConfiguration configuration) Allows to pre-configure the Pulsar component with common options that the endpoints will reuse. The option is a: <code>org.apache.camel.component.pulsar.PulsarConfiguration</code> type. Group: common- Parameters:
configuration
- the value to set- Returns:
- the dsl builder
-
serviceUrl
The Pulsar Service URL to point while creating the client from URI. The option is a: <code>java.lang.String</code> type. Group: common- Parameters:
serviceUrl
- the value to set- Returns:
- the dsl builder
-
ackGroupTimeMillis
default PulsarComponentBuilderFactory.PulsarComponentBuilder ackGroupTimeMillis(long ackGroupTimeMillis) Group the consumer acknowledgments for the specified time in milliseconds - defaults to 100. The option is a: <code>long</code> type. Default: 100 Group: consumer- Parameters:
ackGroupTimeMillis
- the value to set- Returns:
- the dsl builder
-
ackTimeoutMillis
default PulsarComponentBuilderFactory.PulsarComponentBuilder ackTimeoutMillis(long ackTimeoutMillis) Timeout for unacknowledged messages in milliseconds - defaults to 10000. The option is a: <code>long</code> type. Default: 10000 Group: consumer- Parameters:
ackTimeoutMillis
- the value to set- Returns:
- the dsl builder
-
ackTimeoutRedeliveryBackoff
default PulsarComponentBuilderFactory.PulsarComponentBuilder ackTimeoutRedeliveryBackoff(org.apache.pulsar.client.api.RedeliveryBackoff ackTimeoutRedeliveryBackoff) RedeliveryBackoff to use for ack timeout redelivery backoff. The option is a: <code>org.apache.pulsar.client.api.RedeliveryBackoff</code> type. Group: consumer- Parameters:
ackTimeoutRedeliveryBackoff
- the value to set- Returns:
- the dsl builder
-
allowManualAcknowledgement
default PulsarComponentBuilderFactory.PulsarComponentBuilder allowManualAcknowledgement(boolean allowManualAcknowledgement) Whether to allow manual message acknowledgements. If this option is enabled, then messages are not acknowledged automatically after successful route completion. Instead, an instance of PulsarMessageReceipt is stored as a header on the org.apache.camel.Exchange. Messages can then be acknowledged using PulsarMessageReceipt at any time before the ackTimeout occurs. The option is a: <code>boolean</code> type. Default: false Group: consumer- Parameters:
allowManualAcknowledgement
- the value to set- Returns:
- the dsl builder
-
bridgeErrorHandler
default PulsarComponentBuilderFactory.PulsarComponentBuilder 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
-
consumerName
Name of the consumer when subscription is EXCLUSIVE. The option is a: <code>java.lang.String</code> type. Default: sole-consumer Group: consumer- Parameters:
consumerName
- the value to set- Returns:
- the dsl builder
-
consumerNamePrefix
default PulsarComponentBuilderFactory.PulsarComponentBuilder consumerNamePrefix(String consumerNamePrefix) Prefix to add to consumer names when a SHARED or FAILOVER subscription is used. The option is a: <code>java.lang.String</code> type. Default: cons Group: consumer- Parameters:
consumerNamePrefix
- the value to set- Returns:
- the dsl builder
-
consumerQueueSize
default PulsarComponentBuilderFactory.PulsarComponentBuilder consumerQueueSize(int consumerQueueSize) Size of the consumer queue - defaults to 10. The option is a: <code>int</code> type. Default: 10 Group: consumer- Parameters:
consumerQueueSize
- the value to set- Returns:
- the dsl builder
-
deadLetterTopic
default PulsarComponentBuilderFactory.PulsarComponentBuilder deadLetterTopic(String deadLetterTopic) Name of the topic where the messages which fail maxRedeliverCount times will be sent. Note: if not set, default topic name will be topicName-subscriptionName-DLQ. The option is a: <code>java.lang.String</code> type. Group: consumer- Parameters:
deadLetterTopic
- the value to set- Returns:
- the dsl builder
-
maxRedeliverCount
default PulsarComponentBuilderFactory.PulsarComponentBuilder maxRedeliverCount(Integer maxRedeliverCount) Maximum number of times that a message will be redelivered before being sent to the dead letter queue. If this value is not set, no Dead Letter Policy will be created. The option is a: <code>java.lang.Integer</code> type. Group: consumer- Parameters:
maxRedeliverCount
- the value to set- Returns:
- the dsl builder
-
messageListener
default PulsarComponentBuilderFactory.PulsarComponentBuilder messageListener(boolean messageListener) Whether to use the messageListener interface, or to receive messages using a separate thread pool. The option is a: <code>boolean</code> type. Default: true Group: consumer- Parameters:
messageListener
- the value to set- Returns:
- the dsl builder
-
negativeAckRedeliveryBackoff
default PulsarComponentBuilderFactory.PulsarComponentBuilder negativeAckRedeliveryBackoff(org.apache.pulsar.client.api.RedeliveryBackoff negativeAckRedeliveryBackoff) RedeliveryBackoff to use for negative ack redelivery backoff. The option is a: <code>org.apache.pulsar.client.api.RedeliveryBackoff</code> type. Group: consumer- Parameters:
negativeAckRedeliveryBackoff
- the value to set- Returns:
- the dsl builder
-
negativeAckRedeliveryDelayMicros
default PulsarComponentBuilderFactory.PulsarComponentBuilder negativeAckRedeliveryDelayMicros(long negativeAckRedeliveryDelayMicros) Set the negative acknowledgement delay. The option is a: <code>long</code> type. Default: 60000000 Group: consumer- Parameters:
negativeAckRedeliveryDelayMicros
- the value to set- Returns:
- the dsl builder
-
numberOfConsumers
default PulsarComponentBuilderFactory.PulsarComponentBuilder numberOfConsumers(int numberOfConsumers) Number of consumers - defaults to 1. The option is a: <code>int</code> type. Default: 1 Group: consumer- Parameters:
numberOfConsumers
- the value to set- Returns:
- the dsl builder
-
numberOfConsumerThreads
default PulsarComponentBuilderFactory.PulsarComponentBuilder numberOfConsumerThreads(int numberOfConsumerThreads) Number of threads to receive and handle messages when using a separate thread pool. The option is a: <code>int</code> type. Default: 1 Group: consumer- Parameters:
numberOfConsumerThreads
- the value to set- Returns:
- the dsl builder
-
readCompacted
Enable compacted topic reading. The option is a: <code>boolean</code> type. Default: false Group: consumer- Parameters:
readCompacted
- the value to set- Returns:
- the dsl builder
-
subscriptionInitialPosition
default PulsarComponentBuilderFactory.PulsarComponentBuilder subscriptionInitialPosition(org.apache.camel.component.pulsar.utils.consumers.SubscriptionInitialPosition subscriptionInitialPosition) Control the initial position in the topic of a newly created subscription. Default is latest message. The option is a: <code>org.apache.camel.component.pulsar.utils.consumers.SubscriptionInitialPosition</code> type. Default: LATEST Group: consumer- Parameters:
subscriptionInitialPosition
- the value to set- Returns:
- the dsl builder
-
subscriptionName
default PulsarComponentBuilderFactory.PulsarComponentBuilder subscriptionName(String subscriptionName) Name of the subscription to use. The option is a: <code>java.lang.String</code> type. Default: subs Group: consumer- Parameters:
subscriptionName
- the value to set- Returns:
- the dsl builder
-
subscriptionTopicsMode
default PulsarComponentBuilderFactory.PulsarComponentBuilder subscriptionTopicsMode(org.apache.pulsar.client.api.RegexSubscriptionMode subscriptionTopicsMode) Determines to which topics this consumer should be subscribed to - Persistent, Non-Persistent, or both. Only used with pattern subscriptions. The option is a: <code>org.apache.pulsar.client.api.RegexSubscriptionMode</code> type. Default: PersistentOnly Group: consumer- Parameters:
subscriptionTopicsMode
- the value to set- Returns:
- the dsl builder
-
subscriptionType
default PulsarComponentBuilderFactory.PulsarComponentBuilder subscriptionType(org.apache.camel.component.pulsar.utils.consumers.SubscriptionType subscriptionType) Type of the subscription EXCLUSIVESHAREDFAILOVERKEY_SHARED, defaults to EXCLUSIVE. The option is a: <code>org.apache.camel.component.pulsar.utils.consumers.SubscriptionType</code> type. Default: EXCLUSIVE Group: consumer- Parameters:
subscriptionType
- the value to set- Returns:
- the dsl builder
-
topicsPattern
Whether the topic is a pattern (regular expression) that allows the consumer to subscribe to all matching topics in the namespace. The option is a: <code>boolean</code> type. Default: false Group: consumer- Parameters:
topicsPattern
- the value to set- Returns:
- the dsl builder
-
pulsarMessageReceiptFactory
default PulsarComponentBuilderFactory.PulsarComponentBuilder pulsarMessageReceiptFactory(org.apache.camel.component.pulsar.PulsarMessageReceiptFactory pulsarMessageReceiptFactory) Provide a factory to create an alternate implementation of PulsarMessageReceipt. The option is a: <code>org.apache.camel.component.pulsar.PulsarMessageReceiptFactory</code> type. Group: consumer (advanced)- Parameters:
pulsarMessageReceiptFactory
- the value to set- Returns:
- the dsl builder
-
batcherBuilder
default PulsarComponentBuilderFactory.PulsarComponentBuilder batcherBuilder(org.apache.pulsar.client.api.BatcherBuilder batcherBuilder) Control batching method used by the producer. The option is a: <code>org.apache.pulsar.client.api.BatcherBuilder</code> type. Default: DEFAULT Group: producer- Parameters:
batcherBuilder
- the value to set- Returns:
- the dsl builder
-
batchingEnabled
default PulsarComponentBuilderFactory.PulsarComponentBuilder batchingEnabled(boolean batchingEnabled) Control whether automatic batching of messages is enabled for the producer. The option is a: <code>boolean</code> type. Default: true Group: producer- Parameters:
batchingEnabled
- the value to set- Returns:
- the dsl builder
-
batchingMaxMessages
default PulsarComponentBuilderFactory.PulsarComponentBuilder batchingMaxMessages(int batchingMaxMessages) The maximum size to batch messages. The option is a: <code>int</code> type. Default: 1000 Group: producer- Parameters:
batchingMaxMessages
- the value to set- Returns:
- the dsl builder
-
batchingMaxPublishDelayMicros
default PulsarComponentBuilderFactory.PulsarComponentBuilder batchingMaxPublishDelayMicros(long batchingMaxPublishDelayMicros) The maximum time period within which the messages sent will be batched if batchingEnabled is true. The option is a: <code>long</code> type. Default: 1000 Group: producer- Parameters:
batchingMaxPublishDelayMicros
- the value to set- Returns:
- the dsl builder
-
blockIfQueueFull
default PulsarComponentBuilderFactory.PulsarComponentBuilder blockIfQueueFull(boolean blockIfQueueFull) Whether to block the producing thread if pending messages queue is full or to throw a ProducerQueueIsFullError. The option is a: <code>boolean</code> type. Default: false Group: producer- Parameters:
blockIfQueueFull
- the value to set- Returns:
- the dsl builder
-
chunkingEnabled
default PulsarComponentBuilderFactory.PulsarComponentBuilder chunkingEnabled(boolean chunkingEnabled) Control whether chunking of messages is enabled for the producer. The option is a: <code>boolean</code> type. Default: false Group: producer- Parameters:
chunkingEnabled
- the value to set- Returns:
- the dsl builder
-
compressionType
default PulsarComponentBuilderFactory.PulsarComponentBuilder compressionType(org.apache.pulsar.client.api.CompressionType compressionType) Compression type to use. The option is a: <code>org.apache.pulsar.client.api.CompressionType</code> type. Default: NONE Group: producer- Parameters:
compressionType
- the value to set- Returns:
- the dsl builder
-
initialSequenceId
default PulsarComponentBuilderFactory.PulsarComponentBuilder initialSequenceId(long initialSequenceId) The first message published will have a sequence Id of initialSequenceId 1. The option is a: <code>long</code> type. Default: -1 Group: producer- Parameters:
initialSequenceId
- the value to set- Returns:
- the dsl builder
-
lazyStartProducer
default PulsarComponentBuilderFactory.PulsarComponentBuilder 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
-
maxPendingMessages
default PulsarComponentBuilderFactory.PulsarComponentBuilder maxPendingMessages(int maxPendingMessages) Size of the pending massages queue. When the queue is full, by default, any further sends will fail unless blockIfQueueFull=true. The option is a: <code>int</code> type. Default: 1000 Group: producer- Parameters:
maxPendingMessages
- the value to set- Returns:
- the dsl builder
-
maxPendingMessagesAcrossPartitions
@Deprecated default PulsarComponentBuilderFactory.PulsarComponentBuilder maxPendingMessagesAcrossPartitions(int maxPendingMessagesAcrossPartitions) Deprecated.The maximum number of pending messages for partitioned topics. The maxPendingMessages value will be reduced if (number of partitions maxPendingMessages) exceeds this value. Partitioned topics have a pending message queue for each partition. The option is a: <code>int</code> type. Default: 50000 Group: producer- Parameters:
maxPendingMessagesAcrossPartitions
- the value to set- Returns:
- the dsl builder
-
messageRouter
default PulsarComponentBuilderFactory.PulsarComponentBuilder messageRouter(org.apache.pulsar.client.api.MessageRouter messageRouter) Custom Message Router to use. The option is a: <code>org.apache.pulsar.client.api.MessageRouter</code> type. Group: producer- Parameters:
messageRouter
- the value to set- Returns:
- the dsl builder
-
messageRoutingMode
default PulsarComponentBuilderFactory.PulsarComponentBuilder messageRoutingMode(org.apache.pulsar.client.api.MessageRoutingMode messageRoutingMode) Message Routing Mode to use. The option is a: <code>org.apache.pulsar.client.api.MessageRoutingMode</code> type. Default: RoundRobinPartition Group: producer- Parameters:
messageRoutingMode
- the value to set- Returns:
- the dsl builder
-
producerName
Name of the producer. If unset, lets Pulsar select a unique identifier. The option is a: <code>java.lang.String</code> type. Group: producer- Parameters:
producerName
- the value to set- Returns:
- the dsl builder
-
sendTimeoutMs
Send timeout in milliseconds. The option is a: <code>int</code> type. Default: 30000 Group: producer- Parameters:
sendTimeoutMs
- the value to set- Returns:
- the dsl builder
-
autoConfiguration
default PulsarComponentBuilderFactory.PulsarComponentBuilder autoConfiguration(org.apache.camel.component.pulsar.utils.AutoConfiguration autoConfiguration) The pulsar auto configuration. The option is a: <code>org.apache.camel.component.pulsar.utils.AutoConfiguration</code> type. Group: advanced- Parameters:
autoConfiguration
- the value to set- Returns:
- the dsl builder
-
autowiredEnabled
default PulsarComponentBuilderFactory.PulsarComponentBuilder 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
-
pulsarClient
default PulsarComponentBuilderFactory.PulsarComponentBuilder pulsarClient(org.apache.pulsar.client.api.PulsarClient pulsarClient) The pulsar client. The option is a: <code>org.apache.pulsar.client.api.PulsarClient</code> type. Group: advanced- Parameters:
pulsarClient
- the value to set- Returns:
- the dsl builder
-