camel-rest-kafka-connector sink configuration
Connector Description: Expose REST services or call external REST services.
When using camel-rest-kafka-connector as sink make sure to use the following Maven dependency to have support for the connector:
<dependency>
<groupId>org.apache.camel.kafkaconnector</groupId>
<artifactId>camel-rest-kafka-connector</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel Kafka connector version -->
</dependency>
To use this Sink connector in Kafka connect you’ll need to set the following connector.class
connector.class=org.apache.camel.kafkaconnector.rest.CamelRestSinkConnector
The camel-rest sink connector supports 20 options, which are listed below.
Name | Description | Default | Required | Priority |
---|---|---|---|---|
camel.sink.path.method |
HTTP method to use. One of: [get] [post] [put] [delete] [patch] [head] [trace] [connect] [options] |
null |
true |
HIGH |
camel.sink.path.path |
The base path |
null |
true |
HIGH |
camel.sink.path.uriTemplate |
The uri template |
null |
false |
MEDIUM |
camel.sink.endpoint.consumes |
Media type such as: 'text/xml', or 'application/json' this REST service accepts. By default we accept all kinds of types. |
null |
false |
MEDIUM |
camel.sink.endpoint.inType |
To declare the incoming POJO binding type as a FQN class name |
null |
false |
MEDIUM |
camel.sink.endpoint.outType |
To declare the outgoing POJO binding type as a FQN class name |
null |
false |
MEDIUM |
camel.sink.endpoint.produces |
Media type such as: 'text/xml', or 'application/json' this REST service returns. |
null |
false |
MEDIUM |
camel.sink.endpoint.routeId |
Name of the route this REST services creates |
null |
false |
MEDIUM |
camel.sink.endpoint.apiDoc |
The openapi api doc resource to use. The resource is loaded from classpath by default and must be in JSON format. |
null |
false |
MEDIUM |
camel.sink.endpoint.bindingMode |
Configures the binding mode for the producer. If set to anything other than 'off' the producer will try to convert the body of the incoming message from inType to the json or xml, and the response from json or xml to outType. One of: [auto] [off] [json] [xml] [json_xml] |
null |
false |
MEDIUM |
camel.sink.endpoint.host |
Host and port of HTTP service to use (override host in openapi schema) |
null |
false |
MEDIUM |
camel.sink.endpoint.lazyStartProducer |
Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. |
false |
false |
MEDIUM |
camel.sink.endpoint.producerComponentName |
The Camel Rest component to use for (producer) the REST transport, such as http, undertow. If no component has been explicit configured, then Camel will lookup if there is a Camel component that integrates with the Rest DSL, or if a org.apache.camel.spi.RestProducerFactory is registered in the registry. If either one is found, then that is being used. |
null |
false |
MEDIUM |
camel.sink.endpoint.queryParameters |
Query parameters for the HTTP service to call. The query parameters can contain multiple parameters separated by ampersand such such as foo=123&bar=456. |
null |
false |
MEDIUM |
camel.component.rest.apiDoc |
The swagger api doc resource to use. The resource is loaded from classpath by default and must be in JSON format. |
null |
false |
MEDIUM |
camel.component.rest.componentName |
The Camel Rest component to use for (producer) the REST transport, such as http, undertow. If no component has been explicit configured, then Camel will lookup if there is a Camel component that integrates with the Rest DSL, or if a org.apache.camel.spi.RestProducerFactory is registered in the registry. If either one is found, then that is being used. |
null |
false |
LOW |
camel.component.rest.host |
Host and port of HTTP service to use (override host in swagger schema) |
null |
false |
MEDIUM |
camel.component.rest.lazyStartProducer |
Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. |
false |
false |
MEDIUM |
camel.component.rest.producerComponentName |
The Camel Rest component to use for (producer) the REST transport, such as http, undertow. If no component has been explicit configured, then Camel will lookup if there is a Camel component that integrates with the Rest DSL, or if a org.apache.camel.spi.RestProducerFactory is registered in the registry. If either one is found, then that is being used. |
null |
false |
MEDIUM |
camel.component.rest.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 |
false |
MEDIUM |
The camel-rest sink connector has no converters out of the box.
The camel-rest sink connector has no transforms out of the box.
The camel-rest sink connector has no aggregation strategies out of the box.