Interface NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder

All Superinterfaces:
org.apache.camel.builder.EndpointConsumerBuilder, org.apache.camel.EndpointConsumerResolver
All Known Subinterfaces:
NatsEndpointBuilderFactory.NatsEndpointBuilder
Enclosing interface:
NatsEndpointBuilderFactory

public static interface NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder extends org.apache.camel.builder.EndpointConsumerBuilder
Builder for endpoint consumers for the Nats component.
  • Method Details

    • advanced

    • connectionTimeout

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder connectionTimeout(int connectionTimeout)
      Timeout for connection attempts. (in milliseconds). The option is a: int type. Default: 2000 Group: common
      Parameters:
      connectionTimeout - the value to set
      Returns:
      the dsl builder
    • connectionTimeout

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder connectionTimeout(String connectionTimeout)
      Timeout for connection attempts. (in milliseconds). The option will be converted to a int type. Default: 2000 Group: common
      Parameters:
      connectionTimeout - the value to set
      Returns:
      the dsl builder
    • flushConnection

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder flushConnection(boolean flushConnection)
      Define if we want to flush connection when stopping or not. The option is a: boolean type. Default: true Group: common
      Parameters:
      flushConnection - the value to set
      Returns:
      the dsl builder
    • flushConnection

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder flushConnection(String flushConnection)
      Define if we want to flush connection when stopping or not. The option will be converted to a boolean type. Default: true Group: common
      Parameters:
      flushConnection - the value to set
      Returns:
      the dsl builder
    • flushTimeout

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder flushTimeout(int flushTimeout)
      Set the flush timeout (in milliseconds). The option is a: int type. Default: 1000 Group: common
      Parameters:
      flushTimeout - the value to set
      Returns:
      the dsl builder
    • flushTimeout

      Set the flush timeout (in milliseconds). The option will be converted to a int type. Default: 1000 Group: common
      Parameters:
      flushTimeout - the value to set
      Returns:
      the dsl builder
    • jetstreamEnabled

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder jetstreamEnabled(boolean jetstreamEnabled)
      Sets whether to enable JetStream support for this endpoint. The option is a: boolean type. Default: false Group: common
      Parameters:
      jetstreamEnabled - the value to set
      Returns:
      the dsl builder
    • jetstreamEnabled

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder jetstreamEnabled(String jetstreamEnabled)
      Sets whether to enable JetStream support for this endpoint. The option will be converted to a boolean type. Default: false Group: common
      Parameters:
      jetstreamEnabled - the value to set
      Returns:
      the dsl builder
    • jetstreamName

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder jetstreamName(String jetstreamName)
      Sets the name of the JetStream stream to use. The option is a: java.lang.String type. Group: common
      Parameters:
      jetstreamName - the value to set
      Returns:
      the dsl builder
    • maxPingsOut

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder maxPingsOut(int maxPingsOut)
      maximum number of pings have not received a response allowed by the client. The option is a: int type. Default: 2 Group: common
      Parameters:
      maxPingsOut - the value to set
      Returns:
      the dsl builder
    • maxPingsOut

      maximum number of pings have not received a response allowed by the client. The option will be converted to a int type. Default: 2 Group: common
      Parameters:
      maxPingsOut - the value to set
      Returns:
      the dsl builder
    • maxReconnectAttempts

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder maxReconnectAttempts(int maxReconnectAttempts)
      Max reconnection attempts. The option is a: int type. Default: 60 Group: common
      Parameters:
      maxReconnectAttempts - the value to set
      Returns:
      the dsl builder
    • maxReconnectAttempts

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder maxReconnectAttempts(String maxReconnectAttempts)
      Max reconnection attempts. The option will be converted to a int type. Default: 60 Group: common
      Parameters:
      maxReconnectAttempts - the value to set
      Returns:
      the dsl builder
    • noEcho

      Turn off echo. If supported by the gnatsd version you are connecting to this flag will prevent the server from echoing messages back to the connection if it has subscriptions on the subject being published to. The option is a: boolean type. Default: false Group: common
      Parameters:
      noEcho - the value to set
      Returns:
      the dsl builder
    • noEcho

      Turn off echo. If supported by the gnatsd version you are connecting to this flag will prevent the server from echoing messages back to the connection if it has subscriptions on the subject being published to. The option will be converted to a boolean type. Default: false Group: common
      Parameters:
      noEcho - the value to set
      Returns:
      the dsl builder
    • noRandomizeServers

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder noRandomizeServers(boolean noRandomizeServers)
      Whether or not randomizing the order of servers for the connection attempts. The option is a: boolean type. Default: false Group: common
      Parameters:
      noRandomizeServers - the value to set
      Returns:
      the dsl builder
    • noRandomizeServers

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder noRandomizeServers(String noRandomizeServers)
      Whether or not randomizing the order of servers for the connection attempts. The option will be converted to a boolean type. Default: false Group: common
      Parameters:
      noRandomizeServers - the value to set
      Returns:
      the dsl builder
    • pedantic

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder pedantic(boolean pedantic)
      Whether or not running in pedantic mode (this affects performance). The option is a: boolean type. Default: false Group: common
      Parameters:
      pedantic - the value to set
      Returns:
      the dsl builder
    • pedantic

      Whether or not running in pedantic mode (this affects performance). The option will be converted to a boolean type. Default: false Group: common
      Parameters:
      pedantic - the value to set
      Returns:
      the dsl builder
    • pingInterval

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder pingInterval(int pingInterval)
      Ping interval to be aware if connection is still alive (in milliseconds). The option is a: int type. Default: 120000 Group: common
      Parameters:
      pingInterval - the value to set
      Returns:
      the dsl builder
    • pingInterval

      Ping interval to be aware if connection is still alive (in milliseconds). The option will be converted to a int type. Default: 120000 Group: common
      Parameters:
      pingInterval - the value to set
      Returns:
      the dsl builder
    • reconnect

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder reconnect(boolean reconnect)
      Whether or not using reconnection feature. The option is a: boolean type. Default: true Group: common
      Parameters:
      reconnect - the value to set
      Returns:
      the dsl builder
    • reconnect

      Whether or not using reconnection feature. The option will be converted to a boolean type. Default: true Group: common
      Parameters:
      reconnect - the value to set
      Returns:
      the dsl builder
    • reconnectTimeWait

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder reconnectTimeWait(int reconnectTimeWait)
      Waiting time before attempts reconnection (in milliseconds). The option is a: int type. Default: 2000 Group: common
      Parameters:
      reconnectTimeWait - the value to set
      Returns:
      the dsl builder
    • reconnectTimeWait

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder reconnectTimeWait(String reconnectTimeWait)
      Waiting time before attempts reconnection (in milliseconds). The option will be converted to a int type. Default: 2000 Group: common
      Parameters:
      reconnectTimeWait - the value to set
      Returns:
      the dsl builder
    • requestCleanupInterval

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder requestCleanupInterval(int requestCleanupInterval)
      Interval to clean up cancelled/timed out requests. The option is a: int type. Default: 5000 Group: common
      Parameters:
      requestCleanupInterval - the value to set
      Returns:
      the dsl builder
    • requestCleanupInterval

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder requestCleanupInterval(String requestCleanupInterval)
      Interval to clean up cancelled/timed out requests. The option will be converted to a int type. Default: 5000 Group: common
      Parameters:
      requestCleanupInterval - the value to set
      Returns:
      the dsl builder
    • servers

      URLs to one or more NAT servers. Use comma to separate URLs when specifying multiple servers. The option is a: java.lang.String type. Group: common
      Parameters:
      servers - the value to set
      Returns:
      the dsl builder
    • verbose

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder verbose(boolean verbose)
      Whether or not running in verbose mode. The option is a: boolean type. Default: false Group: common
      Parameters:
      verbose - the value to set
      Returns:
      the dsl builder
    • verbose

      Whether or not running in verbose mode. The option will be converted to a boolean type. Default: false Group: common
      Parameters:
      verbose - the value to set
      Returns:
      the dsl builder
    • ackPolicy

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder ackPolicy(io.nats.client.api.AckPolicy ackPolicy)
      Acknowledgement mode. none = Messages are acknowledged as soon as the server sends them (danger: messages that Camel failed to process is also ack). Clients do not need to ack. all = All messages with a sequence number less than the message acked are also acknowledged. E.g. reading a batch of messages 1..100. Ack on message 100 will acknowledge 1..99 as well. explicit (default) = Each message is acknowledged individually by Camel after the message has been processed, this ensures the message is only ack if success and nack if processing failed due to an exception during routing. Message can be acked out of sequence and create gaps of unacknowledged messages in the consumer. The option is a: io.nats.client.api.AckPolicy type. Default: Explicit Group: consumer
      Parameters:
      ackPolicy - the value to set
      Returns:
      the dsl builder
    • ackPolicy

      Acknowledgement mode. none = Messages are acknowledged as soon as the server sends them (danger: messages that Camel failed to process is also ack). Clients do not need to ack. all = All messages with a sequence number less than the message acked are also acknowledged. E.g. reading a batch of messages 1..100. Ack on message 100 will acknowledge 1..99 as well. explicit (default) = Each message is acknowledged individually by Camel after the message has been processed, this ensures the message is only ack if success and nack if processing failed due to an exception during routing. Message can be acked out of sequence and create gaps of unacknowledged messages in the consumer. The option will be converted to a io.nats.client.api.AckPolicy type. Default: Explicit Group: consumer
      Parameters:
      ackPolicy - the value to set
      Returns:
      the dsl builder
    • ackWait

      After a message is delivered to a consumer, the server waits 30 seconds (default) for an acknowledgement. If none arrives (timeout), the message becomes eligible for redelivery. The option is a: long type. Default: 30000 Group: consumer
      Parameters:
      ackWait - the value to set
      Returns:
      the dsl builder
    • ackWait

      After a message is delivered to a consumer, the server waits 30 seconds (default) for an acknowledgement. If none arrives (timeout), the message becomes eligible for redelivery. The option will be converted to a long type. Default: 30000 Group: consumer
      Parameters:
      ackWait - the value to set
      Returns:
      the dsl builder
    • durableName

      Sets the name to assign to the JetStream durable consumer. Setting this value makes the consumer durable. The value is used to set the durable() field in the underlying NATS ConsumerConfiguration.Builder. The option is a: java.lang.String type. Group: consumer
      Parameters:
      durableName - the value to set
      Returns:
      the dsl builder
    • maxDeliver

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder maxDeliver(long maxDeliver)
      Maximum number of attempts to deliver a message from Nats to a consumer. Once MaxDeliver is reached, the NATS server stops attempting to deliver that specific message. The message is not deleted, it remains in the stream but is simply skipped. It is recommended to set this option to a sensible value in case a message is poison and can not successfully be processed and would always keep failing. The option is a: long type. Group: consumer
      Parameters:
      maxDeliver - the value to set
      Returns:
      the dsl builder
    • maxDeliver

      Maximum number of attempts to deliver a message from Nats to a consumer. Once MaxDeliver is reached, the NATS server stops attempting to deliver that specific message. The message is not deleted, it remains in the stream but is simply skipped. It is recommended to set this option to a sensible value in case a message is poison and can not successfully be processed and would always keep failing. The option will be converted to a long type. Group: consumer
      Parameters:
      maxDeliver - the value to set
      Returns:
      the dsl builder
    • maxMessages

      Stop receiving messages from a topic we are subscribing to after maxMessages. The option is a: java.lang.String type. Group: consumer
      Parameters:
      maxMessages - the value to set
      Returns:
      the dsl builder
    • nackWait

      For negative acknowledgements (NAK), redelivery is delayed by 5 seconds (default). Setting this to 0 or negative makes the redelivery immediately. Be careful as this can cause the consumer to keep re-processing the same message over and over again due to intermediate error that last a while. The option is a: long type. Default: 5000 Group: consumer
      Parameters:
      nackWait - the value to set
      Returns:
      the dsl builder
    • nackWait

      For negative acknowledgements (NAK), redelivery is delayed by 5 seconds (default). Setting this to 0 or negative makes the redelivery immediately. Be careful as this can cause the consumer to keep re-processing the same message over and over again due to intermediate error that last a while. The option will be converted to a long type. Default: 5000 Group: consumer
      Parameters:
      nackWait - the value to set
      Returns:
      the dsl builder
    • poolSize

      Consumer thread pool size (default is 10). The option is a: int type. Default: 10 Group: consumer
      Parameters:
      poolSize - the value to set
      Returns:
      the dsl builder
    • poolSize

      Consumer thread pool size (default is 10). The option will be converted to a int type. Default: 10 Group: consumer
      Parameters:
      poolSize - the value to set
      Returns:
      the dsl builder
    • pullSubscription

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder pullSubscription(boolean pullSubscription)
      Sets the consumer subscription type for JetStream. Set to true to use a Pull Subscription (consumer explicitly requests messages). Set to false to use a Push Subscription (messages are automatically delivered). The option is a: boolean type. Default: true Group: consumer
      Parameters:
      pullSubscription - the value to set
      Returns:
      the dsl builder
    • pullSubscription

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder pullSubscription(String pullSubscription)
      Sets the consumer subscription type for JetStream. Set to true to use a Pull Subscription (consumer explicitly requests messages). Set to false to use a Push Subscription (messages are automatically delivered). The option will be converted to a boolean type. Default: true Group: consumer
      Parameters:
      pullSubscription - the value to set
      Returns:
      the dsl builder
    • queueName

      The Queue name if we are using nats for a queue configuration. The option is a: java.lang.String type. Group: consumer
      Parameters:
      queueName - the value to set
      Returns:
      the dsl builder
    • replyToDisabled

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder replyToDisabled(boolean replyToDisabled)
      Can be used to turn off sending back reply message in the consumer. The option is a: boolean type. Default: false Group: consumer
      Parameters:
      replyToDisabled - the value to set
      Returns:
      the dsl builder
    • replyToDisabled

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder replyToDisabled(String replyToDisabled)
      Can be used to turn off sending back reply message in the consumer. The option will be converted to a boolean type. Default: false Group: consumer
      Parameters:
      replyToDisabled - the value to set
      Returns:
      the dsl builder
    • credentialsFilePath

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder credentialsFilePath(String credentialsFilePath)
      If we use useCredentialsFile to true we'll need to set the credentialsFilePath option. It can be loaded by default from classpath, but you can prefix with classpath:, file:, or http: to load the resource from different systems. The option is a: java.lang.String type. Group: security
      Parameters:
      credentialsFilePath - the value to set
      Returns:
      the dsl builder
    • secure

      Set secure option indicating TLS is required. The option is a: boolean type. Default: false Group: security
      Parameters:
      secure - the value to set
      Returns:
      the dsl builder
    • secure

      Set secure option indicating TLS is required. The option will be converted to a boolean type. Default: false Group: security
      Parameters:
      secure - the value to set
      Returns:
      the dsl builder
    • sslContextParameters

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder sslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
      To configure security using SSLContextParameters. The option is a: org.apache.camel.support.jsse.SSLContextParameters type. Group: security
      Parameters:
      sslContextParameters - the value to set
      Returns:
      the dsl builder
    • sslContextParameters

      default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder sslContextParameters(String sslContextParameters)
      To configure security using SSLContextParameters. The option will be converted to a org.apache.camel.support.jsse.SSLContextParameters type. Group: security
      Parameters:
      sslContextParameters - the value to set
      Returns:
      the dsl builder