Camel Spring Boot

Olingo2

Read and change the resources of an OData 2.0 service with Apache Olingo.

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-olingo2-starter</artifactId>
</dependency>

Spring Boot Auto-Configuration

The starter supports 19 options, which are listed below.

Name Description Default Type

camel.component.olingo2.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.olingo2.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.olingo2.configuration

The shared configuration of the endpoints: its options are the defaults of each endpoint of this component. The option is a org.apache.camel.component.olingo2.Olingo2Configuration type.

Olingo2Configuration

camel.component.olingo2.connect-timeout

The timeout in milliseconds to establish an HTTP connection. 0 means no timeout, and a negative value uses the system default. Not used when httpAsyncClientBuilder is set.

30000

Integer

camel.component.olingo2.content-type

The content type of the entries, feeds, properties and links in the requests and the responses, sent in the Content-Type and Accept headers: application/json for JSON, or application/atom+xml for Atom (XML). The service document, $metadata, $value and $count use their own content type.

application/json;charset=utf-8

String

camel.component.olingo2.enabled

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

Boolean

camel.component.olingo2.entity-provider-read-properties

The Olingo EntityProviderReadProperties used to parse the feeds, entries, properties and function import results in the responses, batch responses included. The option is a org.apache.olingo.odata2.api.ep.EntityProviderReadProperties type.

EntityProviderReadProperties

camel.component.olingo2.entity-provider-write-properties

The Olingo EntityProviderWriteProperties used to write the request data of create, update, patch, merge and batch, for example to omit the JSON wrapper or to write only the content of an entry. The service root in them is replaced with serviceUri, and merge always writes only the properties that are in the data. The option is a org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties type.

EntityProviderWriteProperties

camel.component.olingo2.filter-already-seen

Whether to leave out of the results the entries and values that this consumer or producer has already returned. An entry counts as returned before when its ID, URI and properties give the same hash code; the hash codes are kept in memory.

false

Boolean

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

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

HttpAsyncClientBuilder

camel.component.olingo2.http-client-builder

Not used: the component always creates an asynchronous HTTP client, from httpAsyncClientBuilder or from the other HTTP options. The option is a org.apache.http.impl.client.HttpClientBuilder type.

HttpClientBuilder

camel.component.olingo2.http-headers

The HTTP headers to add to each request, as a Map of header names to values, such as an Authorization header. A header of the same name in endpointHttpHeaders overrides it.

String>

camel.component.olingo2.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.olingo2.proxy

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

HttpHost

camel.component.olingo2.service-uri

The base URI of the OData 2.0 service, such as http://services.odata.org/OData/OData.svc. The resource paths are relative to it. It must be set, on the endpoint or on the component.

String

camel.component.olingo2.socket-timeout

The socket timeout (SO_TIMEOUT) in milliseconds: the longest time without data between two packets while waiting for a response. 0 means no timeout, and a negative value uses the system default. Not used when httpAsyncClientBuilder is set.

30000

Integer

camel.component.olingo2.split-result

Whether the consumer sends each entry of a feed, or each element of a List result, as a message of its own. When false, the whole result is one message.

true

Boolean

camel.component.olingo2.ssl-context-parameters

The SSL/TLS configuration of the HTTP client. When not set, the global SSL context parameters are used if useGlobalSslContextParameters is enabled on the component, else the JVM defaults. Not used when httpAsyncClientBuilder is set. The option is a org.apache.camel.support.jsse.SSLContextParameters type.

SSLContextParameters

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

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

false

Boolean