camel-websocket-kafka-connector source configuration

Connector Description: Expose websocket endpoints using Jetty.

When using camel-websocket-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-websocket-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.websocket.CamelWebsocketSourceConnector

The camel-websocket source connector supports 34 options, which are listed below.

Name Description Default Priority

camel.source.path.host

The hostname. The default value is 0.0.0.0. Setting this option on the component will use the component configured value as default.

"0.0.0.0"

MEDIUM

camel.source.path.port

The port number. The default value is 9292. Setting this option on the component will use the component configured value as default.

"9292"

MEDIUM

camel.source.path.resourceUri

Required Name of the websocket channel to use.

HIGH

camel.source.endpoint.maxBinaryMessageSize

Can be used to set the size in bytes that the websocket created by the websocketServlet may be accept before closing. (Default is -1 - or unlimited).

"-1"

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

Whether to enable session support which enables HttpSession for each http request.

false

MEDIUM

camel.source.endpoint.staticResources

Set a resource path for static resources (such as .html files etc). The resources can be loaded from classpath, if you prefix with classpath:, otherwise the resources is loaded from file system or from JAR files. For example to load from root classpath use classpath:., or classpath:WEB-INF/static If not configured (eg null) then no static resource is in use.

MEDIUM

camel.source.endpoint.subprotocol

This is a comma-separated list of subprotocols that are supported by the application. The list is in priority order. The first subprotocol on this list that is proposed by the client is the one that will be accepted. If no subprotocol on this list is proposed by the client, then the websocket connection is refused. The special value 'any' means that any subprotocol is acceptable. 'any' can be used on its own, or as a failsafe at the end of a list of more specific protocols. 'any' will also match the case where no subprotocol is proposed by the client.

"any"

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

Set the buffer size of the websocketServlet, which is also the max frame byte size (default 8192).

"8192"

MEDIUM

camel.source.endpoint.maxIdleTime

Set the time in ms that the websocket created by the websocketServlet may be idle before closing. (default is 300000).

"300000"

MEDIUM

camel.source.endpoint.maxTextMessageSize

Can be used to set the size in characters that the websocket created by the websocketServlet may be accept before closing.

MEDIUM

camel.source.endpoint.minVersion

Can be used to set the minimum protocol version accepted for the websocketServlet. (Default 13 - the RFC6455 version).

"13"

MEDIUM

camel.source.endpoint.allowedOrigins

The CORS allowed origins. Use to allow all.

MEDIUM

camel.source.endpoint.crossOriginFilterOn

Whether to enable CORS.

false

MEDIUM

camel.source.endpoint.filterPath

Context path for filtering CORS.

MEDIUM

camel.source.endpoint.enableJmx

If this option is true, Jetty JMX support will be enabled for this endpoint. See Jetty JMX support for more details.

false

MEDIUM

camel.source.endpoint.sslContextParameters

To configure security using SSLContextParameters.

MEDIUM

camel.component.websocket.host

The hostname. The default value is 0.0.0.0.

"0.0.0.0"

MEDIUM

camel.component.websocket.port

The port number. The default value is 9292.

"9292"

MEDIUM

camel.component.websocket.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.websocket.staticResources

Set a resource path for static resources (such as .html files etc). The resources can be loaded from classpath, if you prefix with classpath:, otherwise the resources is loaded from file system or from JAR files. For example to load from root classpath use classpath:., or classpath:WEB-INF/static If not configured (eg null) then no static resource is in use.

MEDIUM

camel.component.websocket.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.websocket.enableJmx

If this option is true, Jetty JMX support will be enabled for this endpoint. See Jetty JMX support for more details.

false

MEDIUM

camel.component.websocket.maxThreads

To set a value for maximum number of threads in server thread pool. MaxThreads/minThreads or threadPool fields are required due to switch to Jetty9. The default values for maxThreads is 1 2 noCores.

MEDIUM

camel.component.websocket.minThreads

To set a value for minimum number of threads in server thread pool. MaxThreads/minThreads or threadPool fields are required due to switch to Jetty9. The default values for minThreads is 1.

MEDIUM

camel.component.websocket.subprotocol

This is a comma-separated list of subprotocols that are supported by the application. The list is in priority order. The first subprotocol on this list that is proposed by the client is the one that will be accepted. If no subprotocol on this list is proposed by the client, then the websocket connection is refused. The special value 'any' means that any subprotocol is acceptable. 'any' can be used on its own, or as a failsafe at the end of a list of more specific protocols. 'any' will also match the case where no subprotocol is proposed by the client.

"any"

MEDIUM

camel.component.websocket.threadPool

To use a custom thread pool for the server. MaxThreads/minThreads or threadPool fields are required due to switch to Jetty9.

MEDIUM

camel.component.websocket.sslContextParameters

To configure security using SSLContextParameters.

MEDIUM

camel.component.websocket.sslKeyPassword

The password for the keystore when using SSL.

MEDIUM

camel.component.websocket.sslKeystore

The path to the keystore.

MEDIUM

camel.component.websocket.sslPassword

The password when using SSL.

MEDIUM

camel.component.websocket.useGlobalSslContextParameters

Enable usage of global SSL context parameters.

false

MEDIUM

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

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

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