This is an automated email from the ASF dual-hosted git repository. github-actions[bot] pushed a commit to branch camel-main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 029e5f2f074cf2aa7b1430c388ede42f09af1238 Author: Jiří Ondrušek <[email protected]> AuthorDate: Wed Aug 26 12:37:16 2026 +0000 Remove leveldb extension due to the removal of the LevelDB component in Camel (commit 83b6b0f965) Co-Authored-By: Claude Fable 5 <[email protected]> --- catalog/pom.xml | 13 -- .../ROOT/examples/components/iec60870-client.yml | 13 -- .../ROOT/examples/components/iec60870-server.yml | 13 -- docs/modules/ROOT/examples/others/leveldb.yml | 13 -- docs/modules/ROOT/nav.adoc | 1 - .../ROOT/pages/reference/extensions/iec60870.adoc | 14 +- .../ROOT/pages/reference/extensions/leveldb.adoc | 57 -------- extensions/leveldb/deployment/pom.xml | 65 --------- .../leveldb/deployment/LeveldbProcessor.java | 51 ------- extensions/leveldb/pom.xml | 37 ----- extensions/leveldb/runtime/pom.xml | 84 ------------ .../leveldb/runtime/src/main/doc/limitations.adoc | 14 -- .../QuarkusLevelDBAggregationRepository.java | 71 ---------- .../main/resources/META-INF/quarkus-extension.yaml | 36 ----- extensions/pom.xml | 1 - integration-tests/leveldb/pom.xml | 149 --------------------- .../component/leveldb/it/LeveldbResource.java | 135 ------------------- .../component/leveldb/it/LeveldbRouteBuilder.java | 127 ------------------ .../quarkus/component/leveldb/it/LeveldbIT.java | 23 ---- .../quarkus/component/leveldb/it/LeveldbTest.java | 146 -------------------- integration-tests/pom.xml | 1 - poms/bom/pom.xml | 21 --- poms/bom/src/main/generated/flattened-full-pom.xml | 21 --- .../src/main/generated/flattened-reduced-pom.xml | 21 --- .../generated/flattened-reduced-verbose-pom.xml | 21 --- tooling/scripts/test-categories.yaml | 1 - 26 files changed, 3 insertions(+), 1146 deletions(-) diff --git a/catalog/pom.xml b/catalog/pom.xml index 45b34e6d41..9d263ab780 100644 --- a/catalog/pom.xml +++ b/catalog/pom.xml @@ -2697,19 +2697,6 @@ </exclusion> </exclusions> </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-leveldb</artifactId> - <version>${project.version}</version> - <type>pom</type> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>*</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-log</artifactId> diff --git a/docs/modules/ROOT/examples/components/iec60870-client.yml b/docs/modules/ROOT/examples/components/iec60870-client.yml deleted file mode 100644 index 5f9fd3479b..0000000000 --- a/docs/modules/ROOT/examples/components/iec60870-client.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Do not edit directly! -# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page -cqArtifactId: camel-quarkus-iec60870 -cqArtifactIdBase: iec60870 -cqNativeSupported: false -cqStatus: Preview -cqDeprecated: true -cqJvmSince: 1.1.0 -cqNativeSince: n/a -cqCamelPartName: iec60870-client -cqCamelPartTitle: IEC 60870 Client -cqCamelPartDescription: IEC 60870 supervisory control and data acquisition (SCADA) client using NeoSCADA implementation. -cqExtensionPageTitle: IEC 60870 Client diff --git a/docs/modules/ROOT/examples/components/iec60870-server.yml b/docs/modules/ROOT/examples/components/iec60870-server.yml deleted file mode 100644 index 78522e2aed..0000000000 --- a/docs/modules/ROOT/examples/components/iec60870-server.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Do not edit directly! -# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page -cqArtifactId: camel-quarkus-iec60870 -cqArtifactIdBase: iec60870 -cqNativeSupported: false -cqStatus: Preview -cqDeprecated: true -cqJvmSince: 1.1.0 -cqNativeSince: n/a -cqCamelPartName: iec60870-server -cqCamelPartTitle: IEC 60870 Server -cqCamelPartDescription: IEC 60870 supervisory control and data acquisition (SCADA) server using NeoSCADA implementation. -cqExtensionPageTitle: IEC 60870 Client diff --git a/docs/modules/ROOT/examples/others/leveldb.yml b/docs/modules/ROOT/examples/others/leveldb.yml deleted file mode 100644 index a025a5f1ee..0000000000 --- a/docs/modules/ROOT/examples/others/leveldb.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Do not edit directly! -# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page -cqArtifactId: camel-quarkus-leveldb -cqArtifactIdBase: leveldb -cqNativeSupported: true -cqStatus: Stable -cqDeprecated: true -cqJvmSince: 1.2.0 -cqNativeSince: 1.2.0 -cqCamelPartName: leveldb -cqCamelPartTitle: LevelDB -cqCamelPartDescription: Using LevelDB as persistent EIP store -cqExtensionPageTitle: LevelDB diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 0a6b11c146..279fc8a9d7 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -223,7 +223,6 @@ *** xref:reference/extensions/langchain4j-tools.adoc[LangChain4j Tools] *** xref:reference/extensions/langchain4j-web-search.adoc[LangChain4j Web Search] *** xref:reference/extensions/language.adoc[Language] -*** xref:reference/extensions/leveldb.adoc[LevelDB] *** xref:reference/extensions/log.adoc[Log] *** xref:reference/extensions/lucene.adoc[Lucene] *** xref:reference/extensions/lumberjack.adoc[Lumberjack] diff --git a/docs/modules/ROOT/pages/reference/extensions/iec60870.adoc b/docs/modules/ROOT/pages/reference/extensions/iec60870.adoc index 3a5f28563a..7917fe135d 100644 --- a/docs/modules/ROOT/pages/reference/extensions/iec60870.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/iec60870.adoc @@ -6,27 +6,19 @@ :cq-artifact-id: camel-quarkus-iec60870 :cq-native-supported: false :cq-status: Preview -:cq-status-deprecation: Preview Deprecated +:cq-status-deprecation: Preview :cq-description: IEC 60870 supervisory control and data acquisition (SCADA) client using NeoSCADA implementation. -:cq-deprecated: true +:cq-deprecated: false :cq-jvm-since: 1.1.0 :cq-native-since: n/a ifeval::[{doc-show-badges} == true] [.badges] -[.badge-key]##JVM since##[.badge-supported]##1.1.0## [.badge-key]##Native##[.badge-unsupported]##unsupported## [.badge-key]##⚠️##[.badge-unsupported]##Deprecated## +[.badge-key]##JVM since##[.badge-supported]##1.1.0## [.badge-key]##Native##[.badge-unsupported]##unsupported## endif::[] IEC 60870 supervisory control and data acquisition (SCADA) client using NeoSCADA implementation. -[id="extensions-iec60870-whats-inside"] -== What's inside - -* xref:{cq-camel-components}::iec60870-client-component.adoc[IEC 60870 Client component], URI syntax: `iec60870-client:uriPath` -* xref:{cq-camel-components}::iec60870-server-component.adoc[IEC 60870 Server component], URI syntax: `iec60870-server:uriPath` - -Please refer to the above links for usage and configuration details. - [id="extensions-iec60870-maven-coordinates"] == Maven coordinates diff --git a/docs/modules/ROOT/pages/reference/extensions/leveldb.adoc b/docs/modules/ROOT/pages/reference/extensions/leveldb.adoc deleted file mode 100644 index 7b0234caed..0000000000 --- a/docs/modules/ROOT/pages/reference/extensions/leveldb.adoc +++ /dev/null @@ -1,57 +0,0 @@ -// 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-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`). - - diff --git a/extensions/leveldb/deployment/pom.xml b/extensions/leveldb/deployment/pom.xml deleted file mode 100644 index 9b541636ad..0000000000 --- a/extensions/leveldb/deployment/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-leveldb-parent</artifactId> - <version>3.40.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>camel-quarkus-leveldb-deployment</artifactId> - <name>Camel Quarkus :: LevelDB :: Deployment</name> - - <dependencies> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-core-deployment</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-leveldb</artifactId> - </dependency> - <dependency> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-jackson-deployment</artifactId> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <annotationProcessorPaths> - <path> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-extension-processor</artifactId> - <version>${quarkus.version}</version> - </path> - </annotationProcessorPaths> - </configuration> - </plugin> - </plugins> - </build> - -</project> diff --git a/extensions/leveldb/deployment/src/main/java/org/apache/camel/quarkus/component/leveldb/deployment/LeveldbProcessor.java b/extensions/leveldb/deployment/src/main/java/org/apache/camel/quarkus/component/leveldb/deployment/LeveldbProcessor.java deleted file mode 100644 index f848cf8696..0000000000 --- a/extensions/leveldb/deployment/src/main/java/org/apache/camel/quarkus/component/leveldb/deployment/LeveldbProcessor.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.quarkus.component.leveldb.deployment; - -import io.quarkus.deployment.annotations.BuildProducer; -import io.quarkus.deployment.annotations.BuildStep; -import io.quarkus.deployment.builditem.FeatureBuildItem; -import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; -import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem; -import org.apache.camel.support.DefaultExchangeHolder; -import org.iq80.leveldb.impl.Iq80DBFactory; - -class LeveldbProcessor { - - private static final String FEATURE = "camel-leveldb"; - - @BuildStep - FeatureBuildItem feature() { - return new FeatureBuildItem(FEATURE); - } - - @BuildStep - ReflectiveClassBuildItem registerForReflection() { - return ReflectiveClassBuildItem.builder(Iq80DBFactory.class.getName()).build(); - } - - @BuildStep - ReflectiveClassBuildItem registerForReflectionWithFields() { - return ReflectiveClassBuildItem.builder(DefaultExchangeHolder.class.getName()).fields().build(); - } - - @BuildStep - public void registerRuntimeInitializedClasses(BuildProducer<RuntimeInitializedClassBuildItem> resource) { - resource.produce(new RuntimeInitializedClassBuildItem( - org.iq80.leveldb.table.Table.class.getName())); - } -} diff --git a/extensions/leveldb/pom.xml b/extensions/leveldb/pom.xml deleted file mode 100644 index 6ebcc1421f..0000000000 --- a/extensions/leveldb/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-extensions</artifactId> - <version>3.40.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>camel-quarkus-leveldb-parent</artifactId> - <name>Camel Quarkus :: LevelDB</name> - <packaging>pom</packaging> - - <modules> - <module>deployment</module> - <module>runtime</module> - </modules> -</project> diff --git a/extensions/leveldb/runtime/pom.xml b/extensions/leveldb/runtime/pom.xml deleted file mode 100644 index e5be372ef1..0000000000 --- a/extensions/leveldb/runtime/pom.xml +++ /dev/null @@ -1,84 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-leveldb-parent</artifactId> - <version>3.40.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>camel-quarkus-leveldb</artifactId> - <name>Camel Quarkus :: LevelDB :: Runtime</name> - <description>Using LevelDB as persistent EIP store</description> - - <properties> - <camel.quarkus.jvmSince>1.2.0</camel.quarkus.jvmSince> - <camel.quarkus.nativeSince>1.2.0</camel.quarkus.nativeSince> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-core</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-leveldb</artifactId> - <exclusions> - <exclusion> - <artifactId>leveldbjni-all</artifactId> - <groupId>org.fusesource.leveldbjni</groupId> - </exclusion> - <exclusion> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-jackson</artifactId> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-extension-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <annotationProcessorPaths> - <path> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-extension-processor</artifactId> - <version>${quarkus.version}</version> - </path> - </annotationProcessorPaths> - </configuration> - </plugin> - </plugins> - </build> -</project> diff --git a/extensions/leveldb/runtime/src/main/doc/limitations.adoc b/extensions/leveldb/runtime/src/main/doc/limitations.adoc deleted file mode 100644 index 2c29c2b025..0000000000 --- a/extensions/leveldb/runtime/src/main/doc/limitations.adoc +++ /dev/null @@ -1,14 +0,0 @@ -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`). - diff --git a/extensions/leveldb/runtime/src/main/java/org/apache/camel/quarkus/component/leveldb/QuarkusLevelDBAggregationRepository.java b/extensions/leveldb/runtime/src/main/java/org/apache/camel/quarkus/component/leveldb/QuarkusLevelDBAggregationRepository.java deleted file mode 100644 index 7e930ec116..0000000000 --- a/extensions/leveldb/runtime/src/main/java/org/apache/camel/quarkus/component/leveldb/QuarkusLevelDBAggregationRepository.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.quarkus.component.leveldb; - -import com.fasterxml.jackson.databind.Module; -import org.apache.camel.component.leveldb.LevelDBAggregationRepository; -import org.apache.camel.component.leveldb.LevelDBFile; -import org.apache.camel.component.leveldb.serializer.JacksonLevelDBSerializer; - -public class QuarkusLevelDBAggregationRepository extends LevelDBAggregationRepository { - - public QuarkusLevelDBAggregationRepository() { - initSerializer(null); - } - - public QuarkusLevelDBAggregationRepository(String repositoryName) { - super(repositoryName); - initSerializer(null); - } - - public QuarkusLevelDBAggregationRepository(String repositoryName, String persistentFileName) { - super(repositoryName, persistentFileName); - initSerializer(null); - } - - public QuarkusLevelDBAggregationRepository(String repositoryName, LevelDBFile levelDBFile) { - super(repositoryName, levelDBFile); - initSerializer(null); - } - - //constructor with module - - public QuarkusLevelDBAggregationRepository(Module module) { - JacksonLevelDBSerializer serializer = new JacksonLevelDBSerializer(module); - initSerializer(module); - } - - public QuarkusLevelDBAggregationRepository(String repositoryName, Module module) { - super(repositoryName); - initSerializer(module); - } - - public QuarkusLevelDBAggregationRepository(String repositoryName, String persistentFileName, Module module) { - super(repositoryName, persistentFileName); - initSerializer(module); - } - - public QuarkusLevelDBAggregationRepository(String repositoryName, LevelDBFile levelDBFile, Module module) { - super(repositoryName, levelDBFile); - initSerializer(module); - } - - private void initSerializer(Module module) { - JacksonLevelDBSerializer serializer = new JacksonLevelDBSerializer(module); - setSerializer(serializer); - } -} diff --git a/extensions/leveldb/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/leveldb/runtime/src/main/resources/META-INF/quarkus-extension.yaml deleted file mode 100644 index 6042daf714..0000000000 --- a/extensions/leveldb/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This is a generated file. Do not edit directly! -# To re-generate, run the following command from the top level directory: -# -# mvn -N cq:update-quarkus-metadata -# ---- -name: "Camel LevelDB" -description: "Using LevelDB as persistent EIP store" -metadata: - icon-url: "https://raw.githubusercontent.com/apache/camel-website/main/antora-ui-camel/src/img/logo-d.svg" - sponsor: "Apache Software Foundation" - guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/leveldb.html" - categories: - - "integration" - status: "stable" - integrates: - - name: "Camel" - artifact: "org.apache.camel:camel-base" - version: "${camel.version}" \ No newline at end of file diff --git a/extensions/pom.xml b/extensions/pom.xml index fd0bd87734..64de07ad37 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -195,7 +195,6 @@ <module>langchain4j-web-search</module> <module>language</module> <module>ldap</module> - <module>leveldb</module> <module>log</module> <module>lra</module> <module>lumberjack</module> diff --git a/integration-tests/leveldb/pom.xml b/integration-tests/leveldb/pom.xml deleted file mode 100644 index 7f047e3a70..0000000000 --- a/integration-tests/leveldb/pom.xml +++ /dev/null @@ -1,149 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-build-parent-it</artifactId> - <version>3.40.0-SNAPSHOT</version> - <relativePath>../../poms/build-parent-it/pom.xml</relativePath> - </parent> - - <artifactId>camel-quarkus-integration-test-leveldb</artifactId> - <name>Camel Quarkus :: Integration Tests :: LevelDB</name> - <description>Integration tests for Camel Quarkus LevelDB extension</description> - - <dependencies> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-leveldb</artifactId> - </dependency> - <dependency> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-resteasy</artifactId> - </dependency> - <dependency> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-resteasy-jackson</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-direct</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-mock</artifactId> - </dependency> - - <!-- test dependencies --> - <dependency> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>io.rest-assured</groupId> - <artifactId>rest-assured</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - - - <profiles> - <profile> - <id>native</id> - <activation> - <property> - <name>native</name> - </property> - </activation> - <properties> - <quarkus.native.enabled>true</quarkus.native.enabled> - </properties> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>integration-test</goal> - <goal>verify</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>virtualDependencies</id> - <activation> - <property> - <name>!noVirtualDependencies</name> - </property> - </activation> - <dependencies> - <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory --> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-direct-deployment</artifactId> - <version>${project.version}</version> - <type>pom</type> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>*</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-leveldb-deployment</artifactId> - <version>${project.version}</version> - <type>pom</type> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>*</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-mock-deployment</artifactId> - <version>${project.version}</version> - <type>pom</type> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>*</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - </profile> - </profiles> - -</project> diff --git a/integration-tests/leveldb/src/main/java/org/apache/camel/quarkus/component/leveldb/it/LeveldbResource.java b/integration-tests/leveldb/src/main/java/org/apache/camel/quarkus/component/leveldb/it/LeveldbResource.java deleted file mode 100644 index e76619e5a3..0000000000 --- a/integration-tests/leveldb/src/main/java/org/apache/camel/quarkus/component/leveldb/it/LeveldbResource.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.quarkus.component.leveldb.it; - -import java.net.URI; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; - -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.inject.Inject; -import jakarta.ws.rs.Consumes; -import jakarta.ws.rs.DefaultValue; -import jakarta.ws.rs.POST; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.QueryParam; -import jakarta.ws.rs.core.MediaType; -import jakarta.ws.rs.core.Response; -import org.apache.camel.CamelContext; -import org.apache.camel.ProducerTemplate; -import org.apache.camel.component.mock.MockEndpoint; - -import static java.util.stream.Collectors.joining; - -@Path("/leveldb") -@ApplicationScoped -public class LeveldbResource { - - public static String PARAMETER_BODY = "body"; - public static String PARAMETER_FROM_ENDPOINT = "fromEndpoint"; - public static String MOCKS_DELIMITER = ","; - - @Inject - ProducerTemplate producerTemplate; - - @Inject - CamelContext context; - - @Path("/aggregate") - @POST - @Consumes(MediaType.APPLICATION_JSON) - @Produces(MediaType.APPLICATION_JSON) - public Response aggregateTest(List<String> messages, - @QueryParam("path") String path, - @DefaultValue(LeveldbRouteBuilder.MOCK_RESULT) @QueryParam("mocks") String mockNames) throws Exception { - - String[] mockNamesArray = mockNames.split(MOCKS_DELIMITER); - MockEndpoint[] mocks = new MockEndpoint[mockNamesArray.length]; - - for (int i = 0; i < mocks.length; i++) { - mocks[i] = context.getEndpoint(mockNamesArray[i], MockEndpoint.class); - mocks[i].reset(); - - if (i == 0) { - mocks[i].expectedBodiesReceived(messages.stream().sequential().collect(joining("+"))); - } - } - - for (String message : messages) { - producerTemplate.sendBodyAndHeader(path, message, "id", 123); - } - - MockEndpoint.assertIsSatisfied(context, 30, TimeUnit.SECONDS); - - Map<String, List<Map<String, Object>>> data = new HashMap<>(); - for (int i = 0; i < mocks.length; i++) { - data.put(mockNamesArray[i], extractDataFromMock(mocks[i])); - } - - return Response - .created(new URI("https://camel.apache.org/")) - .entity(data) - .build(); - } - - @Path("/aggregateBinary") - @POST - @Consumes(MediaType.APPLICATION_JSON) - @Produces(MediaType.APPLICATION_JSON) - public Response aggregateBinaryTest(String[] messages) throws Exception { - - MockEndpoint mockResult = context.getEndpoint(LeveldbRouteBuilder.MOCK_RESULT, MockEndpoint.class); - mockResult.reset(); - mockResult.setExpectedMessageCount(1); - - byte[] longestBytes = messages[0].getBytes(); - for (String message : messages) { - byte[] b = message.getBytes(); - producerTemplate.sendBodyAndHeader(LeveldbRouteBuilder.DIRECT_BINARY, message.getBytes(), "id", 123); - if (b.length > longestBytes.length) { - longestBytes = b; - } - } - - MockEndpoint.assertIsSatisfied(context, 30, TimeUnit.SECONDS); - - byte[] result = mockResult.getExchanges().get(0).getIn().getBody(byte[].class); - - return Response - .created(new URI("https://camel.apache.org/")) - .entity(Arrays.equals(longestBytes, result)) - .build(); - - } - - private List<Map<String, Object>> extractDataFromMock(MockEndpoint mockEndpoint) { - List<Map<String, Object>> data = mockEndpoint.getReceivedExchanges().stream().sequential() - .map(exchange -> { - Map<String, Object> map = new HashMap<>(exchange.getIn().getHeaders()); - map.put(PARAMETER_FROM_ENDPOINT, exchange.getFromEndpoint().getEndpointUri()); - map.put(PARAMETER_BODY, String.valueOf(exchange.getIn().getBody())); - return map; - }) - .collect(Collectors.toList()); - return data; - } -} diff --git a/integration-tests/leveldb/src/main/java/org/apache/camel/quarkus/component/leveldb/it/LeveldbRouteBuilder.java b/integration-tests/leveldb/src/main/java/org/apache/camel/quarkus/component/leveldb/it/LeveldbRouteBuilder.java deleted file mode 100644 index 00d580fb65..0000000000 --- a/integration-tests/leveldb/src/main/java/org/apache/camel/quarkus/component/leveldb/it/LeveldbRouteBuilder.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.camel.quarkus.component.leveldb.it; - -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; - -import org.apache.camel.AggregationStrategy; -import org.apache.camel.Exchange; -import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.component.leveldb.LevelDBAggregationRepository; -import org.apache.camel.quarkus.component.leveldb.QuarkusLevelDBAggregationRepository; - -public class LeveldbRouteBuilder extends RouteBuilder { - public static final String DIRECT_START = "direct:start"; - public static final String DIRECT_BINARY = "direct:binary"; - public static final String DIRECT_START_WITH_FAILURE = "direct:startWithFailure"; - public static final String DIRECT_START_DEAD_LETTER = "direct:startDeadLetter"; - public static final String MOCK_AGGREGATED = "mock:aggregated"; - public static final String MOCK_RESULT = "mock:result"; - public static final String MOCK_DEAD = "mock:dead"; - public static final String DATA_FOLDER = "target/data"; - - private static AtomicInteger counter = new AtomicInteger(0); - - @Override - public void configure() { - LevelDBAggregationRepository repo = new QuarkusLevelDBAggregationRepository("repo", DATA_FOLDER + "leveldb.dat"); - - from(DIRECT_START) - .aggregate(header("id"), new MyAggregationStrategy()) - .completionSize(7).aggregationRepository(repo) - .to(MOCK_RESULT); - - LevelDBAggregationRepository repoBinary = new QuarkusLevelDBAggregationRepository("repo", - DATA_FOLDER + "levelBinarydb.dat"); - - from(DIRECT_BINARY) - .aggregate(header("id"), new BinaryAggregationStrategy()) - .completionSize(3).aggregationRepository(repoBinary) - .to(MOCK_RESULT); - - LevelDBAggregationRepository repoWithFailure = new QuarkusLevelDBAggregationRepository("repoWithFailure", - DATA_FOLDER + "leveldbWithFailure.dat"); - - repoWithFailure.setUseRecovery(true); - repoWithFailure.setRecoveryInterval(500, TimeUnit.MILLISECONDS); - - from(DIRECT_START_WITH_FAILURE) - .aggregate(header("id"), new MyAggregationStrategy()) - .completionSize(7).aggregationRepository(repoWithFailure) - .to(MOCK_AGGREGATED) - .process(exchange -> { - int count = counter.incrementAndGet(); - if (count <= 2) { - throw new IllegalArgumentException("Failure"); - } - }) - .to(MOCK_RESULT) - .end(); - - LevelDBAggregationRepository repoDeadLetter = new QuarkusLevelDBAggregationRepository("repoDeadLetter", - DATA_FOLDER + "leveldbDeadLetter.dat"); - - repoDeadLetter.setUseRecovery(true); - repoDeadLetter.setRecoveryInterval(500, TimeUnit.MILLISECONDS); - repoDeadLetter.setMaximumRedeliveries(3); - repoDeadLetter.setDeadLetterUri(MOCK_DEAD); - - from(DIRECT_START_DEAD_LETTER) - .aggregate(header("id"), new MyAggregationStrategy()) - .completionSize(7).aggregationRepository(repoDeadLetter) - .to(MOCK_AGGREGATED) - .process(e -> { - throw new IllegalArgumentException("Failure"); - }) - .log("XXX: result exchange id ${exchangeId} with ${body}") - .to(MOCK_RESULT) - .end(); - } - - public static class MyAggregationStrategy implements AggregationStrategy { - - @Override - public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { - if (oldExchange == null) { - return newExchange; - } - String body1 = oldExchange.getIn().getBody(String.class); - String body2 = newExchange.getIn().getBody(String.class); - - oldExchange.getIn().setBody(body1 + "+" + body2); - return oldExchange; - } - } - - public static class BinaryAggregationStrategy implements AggregationStrategy { - - @Override - public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { - if (oldExchange == null) { - return newExchange; - } - byte[] body1 = oldExchange.getIn().getBody(byte[].class); - byte[] body2 = newExchange.getIn().getBody(byte[].class); - - //keeps longer byte[] - oldExchange.getIn().setBody(body1.length > body2.length ? body1 : body2); - return oldExchange; - } - } -} diff --git a/integration-tests/leveldb/src/test/java/org/apache/camel/quarkus/component/leveldb/it/LeveldbIT.java b/integration-tests/leveldb/src/test/java/org/apache/camel/quarkus/component/leveldb/it/LeveldbIT.java deleted file mode 100644 index 19dcdbc635..0000000000 --- a/integration-tests/leveldb/src/test/java/org/apache/camel/quarkus/component/leveldb/it/LeveldbIT.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.quarkus.component.leveldb.it; - -import io.quarkus.test.junit.QuarkusIntegrationTest; - -@QuarkusIntegrationTest -class LeveldbIT extends LeveldbTest { -} diff --git a/integration-tests/leveldb/src/test/java/org/apache/camel/quarkus/component/leveldb/it/LeveldbTest.java b/integration-tests/leveldb/src/test/java/org/apache/camel/quarkus/component/leveldb/it/LeveldbTest.java deleted file mode 100644 index b8995eab06..0000000000 --- a/integration-tests/leveldb/src/test/java/org/apache/camel/quarkus/component/leveldb/it/LeveldbTest.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.quarkus.component.leveldb.it; - -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.InputStream; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -import io.quarkus.test.junit.QuarkusTest; -import io.restassured.RestAssured; -import io.restassured.common.mapper.TypeRef; -import io.restassured.http.ContentType; -import io.restassured.specification.RequestSpecification; -import org.apache.camel.Exchange; -import org.apache.commons.io.FileUtils; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; - -@QuarkusTest -class LeveldbTest { - - @Test - public void testAggregate() { - Map<String, List<Map<String, Object>>> data = testAggregate(LeveldbRouteBuilder.DIRECT_START, - Arrays.asList("S", "H", "E", "L", "D", "O", "N")); - - List<Map<String, Object>> resultData = data.get(LeveldbRouteBuilder.MOCK_RESULT); - - assertEquals("direct://start", resultData.get(0).get(LeveldbResource.PARAMETER_FROM_ENDPOINT)); - } - - @Test - public void testAggregateRecovery() { - Map<String, List<Map<String, Object>>> data = testAggregate(LeveldbRouteBuilder.DIRECT_START_WITH_FAILURE, - Arrays.asList("S", "H", "E", "L", "D", "O", "N")); - - List<Map<String, Object>> resultData = data.get(LeveldbRouteBuilder.MOCK_RESULT); - - assertEquals(Boolean.TRUE, resultData.get(0).get(Exchange.REDELIVERED)); - assertEquals(2, resultData.get(0).get(Exchange.REDELIVERY_COUNTER)); - assertEquals("direct://startWithFailure", resultData.get(0).get(LeveldbResource.PARAMETER_FROM_ENDPOINT)); - } - - @Test - public void testDeadLetter() { - Map<String, List<Map<String, Object>>> data = testAggregate(LeveldbRouteBuilder.DIRECT_START_DEAD_LETTER, - Arrays.asList("S", "H", "E", "L", "D", "O", "N"), - LeveldbRouteBuilder.MOCK_DEAD + "," + LeveldbRouteBuilder.MOCK_RESULT + "," - + LeveldbRouteBuilder.MOCK_AGGREGATED); - - List<Map<String, Object>> deadData = data.get(LeveldbRouteBuilder.MOCK_DEAD); - List<Map<String, Object>> resultData = data.get(LeveldbRouteBuilder.MOCK_RESULT); - List<Map<String, Object>> agreggatedData = data.get(LeveldbRouteBuilder.MOCK_AGGREGATED); - - assertTrue(resultData.isEmpty()); - - assertFalse(agreggatedData.get(0).containsKey(Exchange.REDELIVERED)); - assertEquals(Boolean.TRUE, agreggatedData.get(1).containsKey(Exchange.REDELIVERED)); - assertEquals(1, agreggatedData.get(1).get(Exchange.REDELIVERY_COUNTER)); - assertEquals(3, agreggatedData.get(1).get(Exchange.REDELIVERY_MAX_COUNTER)); - assertEquals(Boolean.TRUE, agreggatedData.get(2).containsKey(Exchange.REDELIVERED)); - assertEquals(2, agreggatedData.get(2).get(Exchange.REDELIVERY_COUNTER)); - assertEquals(3, agreggatedData.get(2).get(Exchange.REDELIVERY_MAX_COUNTER)); - assertEquals(Boolean.TRUE, agreggatedData.get(3).containsKey(Exchange.REDELIVERED)); - assertEquals(3, agreggatedData.get(3).get(Exchange.REDELIVERY_COUNTER)); - assertEquals(3, agreggatedData.get(3).get(Exchange.REDELIVERY_MAX_COUNTER)); - - assertEquals(Boolean.TRUE, deadData.get(0).containsKey(Exchange.REDELIVERED)); - assertEquals(3, deadData.get(0).get(Exchange.REDELIVERY_COUNTER)); - assertFalse(deadData.get(0).containsKey(Exchange.REDELIVERY_MAX_COUNTER)); - } - - @Test - public void testBinaryData() { - - boolean theSame = RestAssured.given() - .contentType(ContentType.JSON) - .body(Arrays.asList("ab", "Sheldon", "cde")) - .post("/leveldb/aggregateBinary") - .then() - .statusCode(201) - .extract().as(Boolean.class); - - assertTrue(theSame); - } - - private Map<String, List<Map<String, Object>>> testAggregate(String path, List<String> messages) { - return testAggregate(path, messages, null); - } - - private Map<String, List<Map<String, Object>>> testAggregate(String path, List<String> messages, String mocks) { - RequestSpecification rs = RestAssured.given() - .queryParam("path", path); - - if (mocks != null) { - rs = rs.queryParam("mocks", mocks); - } - - return rs.contentType(ContentType.JSON) - .body(messages) - .post("/leveldb/aggregate") - .then() - .statusCode(201) - .extract() - .as(new TypeRef<>() { - }); - } - - @AfterAll - public static void afterAll() throws Exception { - File data = new File(LeveldbRouteBuilder.DATA_FOLDER); - FileUtils.deleteDirectory(data); - } - - static byte[] readBytes(InputStream is) throws Exception { - ByteArrayOutputStream os = new ByteArrayOutputStream(); - byte[] buffer = new byte[4096]; - int len; - while ((len = is.read(buffer)) != -1) { - os.write(buffer, 0, len); - } - return os.toByteArray(); - } - -} diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 901ecc7b62..fda93fd187 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -173,7 +173,6 @@ <module>langchain4j-tools</module> <module>langchain4j-web-search</module> <module>ldap</module> - <module>leveldb</module> <module>lra</module> <module>lumberjack</module> <module>mail</module> diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml index 60ce781fe7..76f36445c7 100644 --- a/poms/bom/pom.xml +++ b/poms/bom/pom.xml @@ -2259,17 +2259,6 @@ <artifactId>camel-ldif</artifactId> <version>${camel.version}</version> </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-leveldb</artifactId> - <version>${camel.version}</version> - <exclusions> - <exclusion> - <groupId>org.checkerframework</groupId> - <artifactId>checker-qual</artifactId> - </exclusion> - </exclusions> - </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-log</artifactId> @@ -5579,16 +5568,6 @@ <artifactId>camel-quarkus-ldif-deployment</artifactId> <version>${camel-quarkus.version}</version> </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-leveldb</artifactId> - <version>${camel-quarkus.version}</version> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-leveldb-deployment</artifactId> - <version>${camel-quarkus.version}</version> - </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-log</artifactId> diff --git a/poms/bom/src/main/generated/flattened-full-pom.xml b/poms/bom/src/main/generated/flattened-full-pom.xml index f66b43dd0c..1952871be5 100644 --- a/poms/bom/src/main/generated/flattened-full-pom.xml +++ b/poms/bom/src/main/generated/flattened-full-pom.xml @@ -2172,17 +2172,6 @@ <artifactId>camel-ldif</artifactId> <version>4.23.0-SNAPSHOT</version> </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-leveldb</artifactId> - <version>4.23.0-SNAPSHOT</version> - <exclusions> - <exclusion> - <groupId>org.checkerframework</groupId> - <artifactId>checker-qual</artifactId> - </exclusion> - </exclusions> - </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-log</artifactId> @@ -5464,16 +5453,6 @@ <artifactId>camel-quarkus-ldif-deployment</artifactId> <version>3.40.0-SNAPSHOT</version> </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-leveldb</artifactId> - <version>3.40.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-leveldb-deployment</artifactId> - <version>3.40.0-SNAPSHOT</version> - </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-log</artifactId> diff --git a/poms/bom/src/main/generated/flattened-reduced-pom.xml b/poms/bom/src/main/generated/flattened-reduced-pom.xml index b7977849de..1a4593b993 100644 --- a/poms/bom/src/main/generated/flattened-reduced-pom.xml +++ b/poms/bom/src/main/generated/flattened-reduced-pom.xml @@ -3515,17 +3515,6 @@ <artifactId>camel-ldif</artifactId> <version>4.23.0-SNAPSHOT</version> </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-leveldb</artifactId> - <version>4.23.0-SNAPSHOT</version> - <exclusions> - <exclusion> - <groupId>org.checkerframework</groupId> - <artifactId>checker-qual</artifactId> - </exclusion> - </exclusions> - </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-log</artifactId> @@ -6812,16 +6801,6 @@ <artifactId>camel-quarkus-ldif-deployment</artifactId> <version>3.40.0-SNAPSHOT</version> </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-leveldb</artifactId> - <version>3.40.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-leveldb-deployment</artifactId> - <version>3.40.0-SNAPSHOT</version> - </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-log</artifactId> diff --git a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml index 481f53939d..5f53c5beee 100644 --- a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml +++ b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml @@ -3515,17 +3515,6 @@ <artifactId>camel-ldif</artifactId> <version>4.23.0-SNAPSHOT</version> </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-leveldb</artifactId> - <version>4.23.0-SNAPSHOT</version> - <exclusions> - <exclusion> - <groupId>org.checkerframework</groupId> - <artifactId>checker-qual</artifactId> - </exclusion> - </exclusions> - </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-log</artifactId> @@ -6812,16 +6801,6 @@ <artifactId>camel-quarkus-ldif-deployment</artifactId> <version>3.40.0-SNAPSHOT</version> </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-leveldb</artifactId> - <version>3.40.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-leveldb-deployment</artifactId> - <version>3.40.0-SNAPSHOT</version> - </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-log</artifactId> diff --git a/tooling/scripts/test-categories.yaml b/tooling/scripts/test-categories.yaml index 8da660ecd9..55f3ee0bc3 100644 --- a/tooling/scripts/test-categories.yaml +++ b/tooling/scripts/test-categories.yaml @@ -89,7 +89,6 @@ group-04: - jpa - jta - kudu - - leveldb - mdc - micrometer - micrometer-observability
