The websocket component provides websocket endpoints for communicating with clients using websocket. This component uses Jetty as the websocket implementation.
Name | Kind | Group | Required | Default | Type | Enum | Description |
---|---|---|---|---|---|---|---|
host | path | common | 0.0.0.0 | java.lang.String | The hostname. The default value is 0.0.0.0. Setting this option on the component will use the component configured value as default. | ||
port | path | common | 9292 | java.lang.Integer | The port number. The default value is 9292. Setting this option on the component will use the component configured value as default. | ||
resourceUri | path | common | true | java.lang.String | Name of the websocket channel to use | ||
maxBinaryMessageSize | parameter | common | -1 | java.lang.Integer | 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) | ||
bridgeErrorHandler | parameter | consumer | boolean | 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/ERROR level and ignored. | |||
sessionSupport | parameter | consumer | boolean | Whether to enable session support which enables HttpSession for each http request. | |||
staticResources | parameter | consumer | java.lang.String | 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. | |||
exceptionHandler | parameter | consumer (advanced) | org.apache.camel.spi.ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions, that will be logged at WARN/ERROR level and ignored. | |||
exchangePattern | parameter | consumer (advanced) | org.apache.camel.ExchangePattern | InOnly RobustInOnly InOut InOptionalOut OutOnly RobustOutOnly OutIn OutOptionalIn |
Sets the exchange pattern when the consumer creates an exchange. | ||
sendTimeout | parameter | producer | 30000 | java.lang.Integer | Timeout in millis when sending to a websocket channel. The default timeout is 30000 (30 seconds). | ||
sendToAll | parameter | producer | java.lang.Boolean | To send to all websocket subscribers. Can be used to configure on endpoint level, instead of having to use the WebsocketConstants.SEND_TO_ALL header on the message. | |||
bufferSize | parameter | advanced | 8192 | java.lang.Integer | Set the buffer size of the websocketServlet, which is also the max frame byte size (default 8192) | ||
maxIdleTime | parameter | advanced | 300000 | java.lang.Integer | Set the time in ms that the websocket created by the websocketServlet may be idle before closing. (default is 300000) | ||
maxTextMessageSize | parameter | advanced | java.lang.Integer | Can be used to set the size in characters that the websocket created by the websocketServlet may be accept before closing. | |||
minVersion | parameter | advanced | 13 | java.lang.Integer | Can be used to set the minimum protocol version accepted for the websocketServlet. (Default 13 - the RFC6455 version) | ||
synchronous | parameter | advanced | false | boolean | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | ||
allowedOrigins | parameter | cors | java.lang.String | The CORS allowed origins. Use * to allow all. | |||
crossOriginFilterOn | parameter | cors | boolean | Whether to enable CORS | |||
filterPath | parameter | cors | java.lang.String | Context path for filtering CORS | |||
enableJmx | parameter | monitoring | boolean | If this option is true, Jetty JMX support will be enabled for this endpoint. See Jetty JMX support for more details. | |||
sslContextParameters | parameter | security | org.apache.camel.util.jsse.SSLContextParameters | To configure security using SSLContextParameters |