Camel Spring Boot

Olingo4

Read, create, update and delete the resources of OData 4.0 services using the Apache Olingo client.

What’s inside

Please refer to the above links for usage and configuration details.

Maven coordinates

<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-olingo4-starter</artifactId>
</dependency>

Spring Boot Auto-Configuration

The starter supports 17 options, which are listed below.

Name Description Default Type

camel.component.olingo4.autowired-enabled

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

Boolean

camel.component.olingo4.bridge-error-handler

Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. 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

camel.component.olingo4.configuration

The configuration shared by the endpoints of this component. The option is a org.apache.camel.component.olingo4.Olingo4Configuration type.

Olingo4Configuration

camel.component.olingo4.connect-timeout

The timeout in milliseconds to establish the HTTP connection to the service. 0 means no timeout. Not used when httpAsyncClientBuilder is set.

30000

Integer

camel.component.olingo4.content-type

The content type of the OData payloads: application/json or an XML type such as application/atom+xml. It sets the Accept header of the requests and the format of the request bodies made from a ClientEntity, and the responses of read are parsed in this format. A JSON String body is always sent as application/json, and $metadata, the service document, $count and $value use their own content types.

application/json;charset=utf-8

String

camel.component.olingo4.enabled

Whether to enable auto configuration of the olingo4 component. This is enabled by default.

Boolean

camel.component.olingo4.filter-already-seen

Whether to leave out the results that this consumer or producer has already returned: a result counts as seen when an earlier one had the same hash code, which Olingo computes from the content. The hash codes are kept in memory. For an entity set or a collection, only the entities or values not seen before are kept; a single result seen before is dropped (the producer returns null).

false

Boolean

camel.component.olingo4.http-async-client-builder

A custom Apache HttpAsyncClient builder to create the HTTP client with. When set, connectTimeout, socketTimeout, proxy and sslContextParameters are not used. Set a socket timeout on the builder, otherwise a request can wait forever for the response. The option is a org.apache.http.impl.nio.client.HttpAsyncClientBuilder type.

HttpAsyncClientBuilder

camel.component.olingo4.http-client-builder

A custom Apache HttpClient builder for a synchronous HTTP client. Currently not used: the component always creates an asynchronous client, from httpAsyncClientBuilder or from connectTimeout, socketTimeout, proxy and sslContextParameters. The option is a org.apache.http.impl.client.HttpClientBuilder type.

HttpClientBuilder

camel.component.olingo4.http-headers

HTTP headers to add to every request to the service, for example an Authorization header. They replace the headers of the same name that the component sets.

String>

camel.component.olingo4.lazy-start-producer

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

Boolean

camel.component.olingo4.proxy

The HTTP proxy to send the requests through, as an org.apache.http.HttpHost. Not used when httpAsyncClientBuilder is set. The option is a org.apache.http.HttpHost type.

HttpHost

camel.component.olingo4.service-uri

The base URI of the OData service, for example https://services.odata.org/TripPinRESTierService. The resource paths are relative to it.

String

camel.component.olingo4.socket-timeout

The socket timeout (SO_TIMEOUT) in milliseconds: the longest time to wait for data from the service between two packets. 0 means no timeout. Not used when httpAsyncClientBuilder is set.

30000

Integer

camel.component.olingo4.split-result

Whether the consumer sends one message per entity of an entity set, or per value of a collection, instead of one message with the whole result.

true

Boolean

camel.component.olingo4.ssl-context-parameters

The SSL/TLS configuration for HTTPS connections to the service. When not set, the global SSL context parameters are used if useGlobalSslContextParameters is enabled, otherwise the default SSL context of the JVM. Not used when httpAsyncClientBuilder is set. The option is a org.apache.camel.support.jsse.SSLContextParameters type.

SSLContextParameters

camel.component.olingo4.use-global-ssl-context-parameters

Whether to use the global SSL context parameters of the CamelContext when sslContextParameters is not set.

false

Boolean