camel-nats-kafka-connector source configuration

Connector Description: Send and receive messages from NATS messaging system.

When using camel-nats-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-nats-kafka-connector</artifactId>
  <version>x.x.x</version>
  <!-- use the same version as your Camel Kafka connector version -->
</dependency>

To use this source connector in Kafka connect you’ll need to set the following connector.class

connector.class=org.apache.camel.kafkaconnector.nats.CamelNatsSourceConnector

The camel-nats source connector supports 31 options, which are listed below.

Name Description Default Priority

camel.source.path.topic

Required The name of topic we want to use.

HIGH

camel.source.endpoint.connectionTimeout

Timeout for connection attempts. (in milliseconds).

2000

MEDIUM

camel.source.endpoint.flushConnection

Define if we want to flush connection when stopping or not.

true

MEDIUM

camel.source.endpoint.flushTimeout

Set the flush timeout (in milliseconds).

1000

MEDIUM

camel.source.endpoint.maxPingsOut

maximum number of pings have not received a response allowed by the client.

2

MEDIUM

camel.source.endpoint.maxReconnectAttempts

Max reconnection attempts.

60

MEDIUM

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

false

MEDIUM

camel.source.endpoint.noRandomizeServers

Whether or not randomizing the order of servers for the connection attempts.

false

MEDIUM

camel.source.endpoint.pedantic

Whether or not running in pedantic mode (this affects performance).

false

MEDIUM

camel.source.endpoint.pingInterval

Ping interval to be aware if connection is still alive (in milliseconds).

120000

MEDIUM

camel.source.endpoint.reconnect

Whether or not using reconnection feature.

true

MEDIUM

camel.source.endpoint.reconnectTimeWait

Waiting time before attempts reconnection (in milliseconds).

2000

MEDIUM

camel.source.endpoint.requestCleanupInterval

Interval to clean up cancelled/timed out requests.

5000

MEDIUM

camel.source.endpoint.servers

URLs to one or more NAT servers. Use comma to separate URLs when specifying multiple servers.

MEDIUM

camel.source.endpoint.verbose

Whether or not running in verbose mode.

false

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.maxMessages

Stop receiving messages from a topic we are subscribing to after maxMessages.

MEDIUM

camel.source.endpoint.poolSize

Consumer thread pool size (default is 10).

10

MEDIUM

camel.source.endpoint.queueName

The Queue name if we are using nats for a queue configuration.

MEDIUM

camel.source.endpoint.replyToDisabled

Can be used to turn off sending back reply message in the consumer.

false

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.

MEDIUM

camel.source.endpoint.exchangePattern

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

Enum values:

  • InOnly

  • InOut

  • InOptionalOut

MEDIUM

camel.source.endpoint.connection

Reference an already instantiated connection to Nats server.

MEDIUM

camel.source.endpoint.traceConnection

Whether or not connection trace messages should be printed to standard out for fine grained debugging of connection issues.

false

MEDIUM

camel.source.endpoint.secure

Set secure option indicating TLS is required.

false

MEDIUM

camel.source.endpoint.sslContextParameters

To configure security using SSLContextParameters.

MEDIUM

camel.component.nats.servers

URLs to one or more NAT servers. Use comma to separate URLs when specifying multiple servers.

MEDIUM

camel.component.nats.verbose

Whether or not running in verbose mode.

false

MEDIUM

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

true

MEDIUM

camel.component.nats.useGlobalSslContextParameters

Enable usage of global SSL context parameters.

false

MEDIUM

The camel-nats source connector has no converters out of the box.

The camel-nats source connector has no transforms out of the box.

The camel-nats source connector has no aggregation strategies out of the box.