// Do not edit directly!
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
[id="extensions-leveldb"]
= LevelDB
:linkattrs:
:cq-artifact-id: camel-quarkus-leveldb
:cq-native-supported: true
:cq-status: Stable
:cq-status-deprecation: Stable
:cq-description: Using LevelDB as persistent EIP store
:cq-deprecated: false
:cq-jvm-since: 1.2.0
:cq-native-since: 1.2.0

ifeval::[{doc-show-badges} == true]
[.badges]
[.badge-key]##JVM since##[.badge-supported]##1.2.0## [.badge-key]##Native since##[.badge-supported]##1.2.0##
endif::[]

Using LevelDB as persistent EIP store

[id="extensions-leveldb-whats-inside"]
== What's inside

* xref:{cq-camel-components}:others:leveldb.adoc[LevelDB]

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

[id="extensions-leveldb-maven-coordinates"]
== Maven coordinates

https://{link-quarkus-code-generator}/?extension-search=camel-quarkus-leveldb[Create a new project with this extension on {link-quarkus-code-generator}, window="_blank"]

Or add the coordinates to your existing project:

[source,xml]
----
<dependency>
    <groupId>org.apache.camel.quarkus</groupId>
    <artifactId>camel-quarkus-leveldb</artifactId>
</dependency>
----
ifeval::[{doc-show-user-guide-link} == true]
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
endif::[]

[id="extensions-leveldb-camel-quarkus-limitations"]
== Camel Quarkus limitations

In native mode the extension uses a port of LevelDB written in Java (https://github.com/dain/leveldb#leveldb-in-java[documentation]),
which is within 10% of the performance of the C++ original. Please upvote https://github.com/apache/camel-quarkus/issues/1911[this issue]
if you do not like the present state.

Serialization is https://github.com/oracle/graal/issues/460[not supported] on GraalVM. Extension has to use serialization based
on Jackson. Aggregation repository in native has to be constructed in one of the following ways:

* Use class `QuarkusLevelDBAggregationRepository` instead of `LevelDBAggregationRepository`.
* Configure jackson serializer on `LevelDBAggregationRepository` by calling `repo.setSerializer(new JacksonLevelDBSerializer());`

Jackson serializer has limitation towards binary content. If payload object contains binary data (does not concern payloads which are completely binary), Jackson serialization and deserialization won't work correctly.
To avoid this, define your own jackson serializer/deserializer via `Module` and provide it to the aggregation repository
(you can use for example the constructor of `QuarkusLevelDBAggregationRepository`).


