CoAP Component
Available as of Camel version 2.16
Camel-CoAP is an Apache Camel component that allows you to work with CoAP, a lightweight REST-type protocol for machine-to-machine operation. CoAP, Constrained Application Protocol is a specialized web transfer protocol for use with constrained nodes and constrained networks and it is based on RFC 7252.
Maven users will need to add the following dependency to their pom.xml for this component:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-coap</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>
Options
The CoAP component has no options.
The CoAP endpoint is configured using URI syntax:
coap:uri
with the following path and query parameters:
Path Parameters (1 parameters):
Name | Description | Default | Type |
---|---|---|---|
uri |
The URI for the CoAP endpoint |
URI |
Query Parameters (5 parameters):
Name | Description | Default | Type |
---|---|---|---|
coapMethod (common) |
The CoAP method this endpoint binds to. Default is to bind to all () but can be restricted to GET POST PUT DELETE PING |
* |
String |
bridgeErrorHandler (consumer) |
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 |
boolean |
exceptionHandler (consumer) |
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 or ERROR level and ignored. |
ExceptionHandler |
|
exchangePattern (consumer) |
Sets the exchange pattern when the consumer creates an exchange. |
ExchangePattern |
|
synchronous (advanced) |
Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). |
false |
boolean |