Interface SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder

  • All Superinterfaces:
    org.apache.camel.builder.EndpointConsumerBuilder, org.apache.camel.EndpointConsumerResolver
    All Known Subinterfaces:
    SoroushBotEndpointBuilderFactory.SoroushBotEndpointBuilder
    Enclosing interface:
    SoroushBotEndpointBuilderFactory

    public static interface SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder
    extends org.apache.camel.builder.EndpointConsumerBuilder
    Builder for endpoint consumers for the Soroush component.
    • Method Detail

      • maxConnectionRetry

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder maxConnectionRetry​(int maxConnectionRetry)
        Maximum connection retry when fail to connect to soroush API, if the quota is reached, MaximumConnectionRetryReachedException is thrown for that message. The option is a: int type. Default: 4 Group: common
      • maxConnectionRetry

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder maxConnectionRetry​(String maxConnectionRetry)
        Maximum connection retry when fail to connect to soroush API, if the quota is reached, MaximumConnectionRetryReachedException is thrown for that message. The option will be converted to a int type. Default: 4 Group: common
      • bridgeErrorHandler

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder 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: boolean type. Default: false Group: consumer
      • bridgeErrorHandler

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder bridgeErrorHandler​(String 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 will be converted to a boolean type. Default: false Group: consumer
      • concurrentConsumers

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder concurrentConsumers​(int 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. The option is a: int type. Default: 1 Group: consumer
      • concurrentConsumers

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder concurrentConsumers​(String 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. The option will be converted to a int type. Default: 1 Group: consumer
      • queueCapacityPerThread

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder queueCapacityPerThread​(int 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. The option is a: int type. Default: 0 Group: consumer
      • queueCapacityPerThread

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder queueCapacityPerThread​(String 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. The option will be converted to a int type. Default: 0 Group: consumer
      • backOffStrategy

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder backOffStrategy​(String 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. The option is a: java.lang.String type. Default: Exponential Group: scheduling
      • reconnectIdleConnectionTimeout

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder reconnectIdleConnectionTimeout​(long reconnectIdleConnectionTimeout)
        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. The option is a: long type. Default: 300000 Group: scheduling
      • reconnectIdleConnectionTimeout

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder reconnectIdleConnectionTimeout​(String reconnectIdleConnectionTimeout)
        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. The option will be converted to a long type. Default: 300000 Group: scheduling
      • retryWaitingTime

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder retryWaitingTime​(long 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. The option is a: long type. Default: 1000 Group: scheduling
      • retryWaitingTime

        default SoroushBotEndpointBuilderFactory.SoroushBotEndpointConsumerBuilder retryWaitingTime​(String 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. The option will be converted to a long type. Default: 1000 Group: scheduling