The rest component is used for either hosting REST services (consumer) or calling external REST services (producer).
Name | Kind | Group | Required | Default | Type | Enum | Description |
---|---|---|---|---|---|---|---|
method | path | common | true | java.lang.String | get post put delete patch head trace connect options |
HTTP method to use. | |
path | path | common | true | java.lang.String | The base path | ||
uriTemplate | path | common | java.lang.String | The uri template | |||
componentName | parameter | common | java.lang.String | The Camel Rest component to use for the REST transport, such as restlet, spark-rest. 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.RestConsumerFactory is registered in the registry. If either one is found, then that is being used. | |||
consumes | parameter | common | java.lang.String | Media type such as: 'text/xml', or 'application/json' this REST service accepts. By default we accept all kinds of types. | |||
inType | parameter | common | java.lang.String | To declare the incoming POJO binding type as a FQN class name | |||
outType | parameter | common | java.lang.String | To declare the outgoing POJO binding type as a FQN class name | |||
produces | parameter | common | java.lang.String | Media type such as: 'text/xml', or 'application/json' this REST service returns. | |||
routeId | parameter | common | java.lang.String | Name of the route this REST services creates | |||
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. | |||
description | parameter | consumer | java.lang.String | Human description to document this REST service | |||
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 default exchange pattern when creating an exchange. | ||
apiDoc | parameter | producer | java.lang.String | The swagger api doc resource to use. The resource is loaded from classpath by default and must be in JSon format. | |||
host | parameter | producer | java.lang.String | Host and port of HTTP service to use (override host in swagger schema) | |||
queryParameters | parameter | producer | java.lang.String | Query parameters for the HTTP service to call | |||
synchronous | parameter | advanced | false | boolean | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). @param synchronous true to enforce synchronous processing |