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 Summary
Modifier and TypeMethodDescriptionackPolicy(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).Acknowledgement mode. none = Messages are acknowledged as soon as the server sends them (danger: messages that Camel failed to process is also ack).ackWait(long ackWait) After a message is delivered to a consumer, the server waits 30 seconds (default) for an acknowledgement.After a message is delivered to a consumer, the server waits 30 seconds (default) for an acknowledgement.advanced()connectionTimeout(int connectionTimeout) Timeout for connection attempts.connectionTimeout(String connectionTimeout) Timeout for connection attempts.credentialsFilePath(String credentialsFilePath) If we use useCredentialsFile to true we'll need to set the credentialsFilePath option.durableName(String durableName) Sets the name to assign to the JetStream durable consumer.flushConnection(boolean flushConnection) Define if we want to flush connection when stopping or not.flushConnection(String flushConnection) Define if we want to flush connection when stopping or not.flushTimeout(int flushTimeout) Set the flush timeout (in milliseconds).flushTimeout(String flushTimeout) Set the flush timeout (in milliseconds).jetstreamEnabled(boolean jetstreamEnabled) Sets whether to enable JetStream support for this endpoint.jetstreamEnabled(String jetstreamEnabled) Sets whether to enable JetStream support for this endpoint.jetstreamName(String jetstreamName) Sets the name of the JetStream stream to use.maxDeliver(long maxDeliver) Maximum number of attempts to deliver a message from Nats to a consumer.maxDeliver(String maxDeliver) Maximum number of attempts to deliver a message from Nats to a consumer.maxMessages(String maxMessages) Stop receiving messages from a topic we are subscribing to after maxMessages.maxPingsOut(int maxPingsOut) maximum number of pings have not received a response allowed by the client.maxPingsOut(String maxPingsOut) maximum number of pings have not received a response allowed by the client.maxReconnectAttempts(int maxReconnectAttempts) Max reconnection attempts.maxReconnectAttempts(String maxReconnectAttempts) Max reconnection attempts.nackWait(long nackWait) For negative acknowledgements (NAK), redelivery is delayed by 5 seconds (default).For negative acknowledgements (NAK), redelivery is delayed by 5 seconds (default).noEcho(boolean noEcho) Turn off echo.Turn off echo.noRandomizeServers(boolean noRandomizeServers) Whether or not randomizing the order of servers for the connection attempts.noRandomizeServers(String noRandomizeServers) Whether or not randomizing the order of servers for the connection attempts.pedantic(boolean pedantic) Whether or not running in pedantic mode (this affects performance).Whether or not running in pedantic mode (this affects performance).pingInterval(int pingInterval) Ping interval to be aware if connection is still alive (in milliseconds).pingInterval(String pingInterval) Ping interval to be aware if connection is still alive (in milliseconds).poolSize(int poolSize) Consumer thread pool size (default is 10).Consumer thread pool size (default is 10).pullSubscription(boolean pullSubscription) Sets the consumer subscription type for JetStream.pullSubscription(String pullSubscription) Sets the consumer subscription type for JetStream.The Queue name if we are using nats for a queue configuration.reconnect(boolean reconnect) Whether or not using reconnection feature.Whether or not using reconnection feature.reconnectTimeWait(int reconnectTimeWait) Waiting time before attempts reconnection (in milliseconds).reconnectTimeWait(String reconnectTimeWait) Waiting time before attempts reconnection (in milliseconds).replyToDisabled(boolean replyToDisabled) Can be used to turn off sending back reply message in the consumer.replyToDisabled(String replyToDisabled) Can be used to turn off sending back reply message in the consumer.requestCleanupInterval(int requestCleanupInterval) Interval to clean up cancelled/timed out requests.requestCleanupInterval(String requestCleanupInterval) Interval to clean up cancelled/timed out requests.secure(boolean secure) Set secure option indicating TLS is required.Set secure option indicating TLS is required.URLs to one or more NAT servers.sslContextParameters(String sslContextParameters) To configure security using SSLContextParameters.sslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters) To configure security using SSLContextParameters.verbose(boolean verbose) Whether or not running in verbose mode.Whether or not running in verbose mode.Methods inherited from interface org.apache.camel.builder.EndpointConsumerBuilder
doSetMultiValueProperties, doSetMultiValueProperty, doSetProperty, expr, getRawUriMethods inherited from interface org.apache.camel.EndpointConsumerResolver
resolve, resolve
-
Method Details
-
advanced
-
connectionTimeout
default NatsEndpointBuilderFactory.NatsEndpointConsumerBuilder connectionTimeout(int connectionTimeout) Timeout for connection attempts. (in milliseconds). The option is a:inttype. 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 ainttype. 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:booleantype. 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 abooleantype. Default: true Group: common- Parameters:
flushConnection- the value to set- Returns:
- the dsl builder
-
flushTimeout
Set the flush timeout (in milliseconds). The option is a:inttype. 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 ainttype. 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:booleantype. 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 abooleantype. Default: false Group: common- Parameters:
jetstreamEnabled- the value to set- Returns:
- the dsl builder
-
jetstreamName
Sets the name of the JetStream stream to use. The option is a:java.lang.Stringtype. Group: common- Parameters:
jetstreamName- the value to set- Returns:
- the dsl builder
-
maxPingsOut
maximum number of pings have not received a response allowed by the client. The option is a:inttype. 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 ainttype. 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:inttype. 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 ainttype. 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:booleantype. 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 abooleantype. 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:booleantype. 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 abooleantype. Default: false Group: common- Parameters:
noRandomizeServers- the value to set- Returns:
- the dsl builder
-
pedantic
Whether or not running in pedantic mode (this affects performance). The option is a:booleantype. 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 abooleantype. Default: false Group: common- Parameters:
pedantic- the value to set- Returns:
- the dsl builder
-
pingInterval
Ping interval to be aware if connection is still alive (in milliseconds). The option is a:inttype. 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 ainttype. Default: 120000 Group: common- Parameters:
pingInterval- the value to set- Returns:
- the dsl builder
-
reconnect
Whether or not using reconnection feature. The option is a:booleantype. 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 abooleantype. 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:inttype. 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 ainttype. 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:inttype. 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 ainttype. 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.Stringtype. Group: common- Parameters:
servers- the value to set- Returns:
- the dsl builder
-
verbose
Whether or not running in verbose mode. The option is a:booleantype. 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 abooleantype. 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.AckPolicytype. 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 aio.nats.client.api.AckPolicytype. 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:longtype. 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 alongtype. 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.Stringtype. Group: consumer- Parameters:
durableName- 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 is a:longtype. 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 alongtype. 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.Stringtype. 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:longtype. 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 alongtype. 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:inttype. 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 ainttype. 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:booleantype. 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 abooleantype. 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.Stringtype. 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:booleantype. 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 abooleantype. 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.Stringtype. Group: security- Parameters:
credentialsFilePath- the value to set- Returns:
- the dsl builder
-
secure
Set secure option indicating TLS is required. The option is a:booleantype. 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 abooleantype. 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.SSLContextParameterstype. 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 aorg.apache.camel.support.jsse.SSLContextParameterstype. Group: security- Parameters:
sslContextParameters- the value to set- Returns:
- the dsl builder
-