camel-soroush-kafka-connector source configuration

When using camel-soroush-kafka-connector as source make sure to use the following Maven dependency to have support for the connector:

<dependency>
  <groupId>org.apache.camel.kafkaconnector</groupId>
  <artifactId>camel-soroush-kafka-connector</artifactId>
  <version>x.x.x</version>
  <!-- use the same version as your Camel Kafka connector version -->
</dependency>

The camel-soroush source connector supports 20 options, which are listed below.

Name Description Default Priority

camel.source.path.action

The action to do. One of: [sendMessage] [getMessage] [uploadFile] [downloadFile]

null

HIGH

camel.source.endpoint.connectionTimeout

Connection timeout in ms when connecting to soroush API

30000

MEDIUM

camel.source.endpoint.maxConnectionRetry

Maximum connection retry when fail to connect to soroush API, if the quota is reached, MaximumConnectionRetryReachedException is thrown for that message.

4

MEDIUM

camel.source.endpoint.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.

false

MEDIUM

camel.source.endpoint.concurrentConsumers

Number of Thread created by consumer in the route. if you use this method for parallelism, it is guaranteed that messages from same user always execute in the same thread and therefore messages from the same user are processed sequentially. Default value notice: using SoroushBotSingleThreadConsumer

1

MEDIUM

camel.source.endpoint.queueCapacityPerThread

Maximum capacity of each queue when concurrentConsumers is greater than 1. if a queue become full, every message that should go to that queue will be dropped. If bridgeErrorHandler is set to true, an exchange with CongestionException is directed to ErrorHandler. You can then processed the error using onException(CongestionException.class) route. Default value notice: infinite capacity

0

MEDIUM

camel.source.endpoint.exceptionHandler

To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored.

null

MEDIUM

camel.source.endpoint.exchangePattern

Sets the exchange pattern when the consumer creates an exchange. One of: [InOnly] [InOut] [InOptionalOut]

null

MEDIUM

camel.source.endpoint.basicPropertyBinding

Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities

false

MEDIUM

camel.source.endpoint.synchronous

Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported).

false

MEDIUM

camel.source.endpoint.backOffStrategy

The strategy to backoff in case of connection failure. Currently 3 strategies are supported: 1. Exponential (default): It multiply retryWaitingTime by retryExponentialCoefficient after each connection failure. 2. Linear: It increase retryWaitingTime by retryLinearIncrement after each connection failure. 3. Fixed: Always use retryWaitingTime as the time between retries.

"Exponential"

MEDIUM

camel.source.endpoint.maxRetryWaitingTime

Maximum amount of time (in millisecond) a thread wait before retrying failed request.

3600000L

MEDIUM

camel.source.endpoint.reconnectIdleConnection Timeout

The timeout in millisecond to reconnect the existing getMessage connection to ensure that the connection is always live and does not dead without notifying the bot. this value should not be changed.

300000L

MEDIUM

camel.source.endpoint.retryExponentialCoefficient

Coefficient to compute back off time when using Exponential Back Off strategy

2L

MEDIUM

camel.source.endpoint.retryLinearIncrement

The amount of time (in millisecond) which adds to waiting time when using Linear back off strategy

10000L

MEDIUM

camel.source.endpoint.retryWaitingTime

Waiting time before retry failed request (Millisecond). If backOffStrategy is not Fixed this is the based value for computing back off waiting time. the first retry is always happen immediately after failure and retryWaitingTime do not apply to the first retry.

1000L

MEDIUM

camel.source.endpoint.authorizationToken

The authorization token for using the bot. if uri path does not contain authorization token, this token will be used.

null

MEDIUM

camel.component.soroush.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.

false

MEDIUM

camel.component.soroush.basicPropertyBinding

Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities

false

MEDIUM

camel.component.soroush.authorizationToken

The default Soroush authorization token to be used when the information is not provided in the endpoints.

null

MEDIUM