diff --git a/bom/pom.xml b/bom/pom.xml
index 48412ba49f..2e32c76703 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -427,7 +427,7 @@ quarkus.vertx.max-event-loop-execute-time=${max.event-loop.execute-time:20000}
org.eclipse.hono
- hono-service-command-router
+ hono-service-command-router-base
${project.version}
diff --git a/services/command-router/pom.xml b/services/command-router-base/pom.xml
similarity index 65%
rename from services/command-router/pom.xml
rename to services/command-router-base/pom.xml
index aeaa5a4738..7b32bfc186 100644
--- a/services/command-router/pom.xml
+++ b/services/command-router-base/pom.xml
@@ -11,7 +11,7 @@
SPDX-License-Identifier: EPL-2.0
-->
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
org.eclipse.hono
@@ -19,15 +19,16 @@
2.6.0-SNAPSHOT
../parent
- hono-service-command-router
- Hono Command Router
- A Quarkus based implementation of Hono's Command Router API that is using Infinispan for storing data.
+ hono-service-command-router-base
+ Hono Service Command Router Base
+ Base classes for implementing a Quarkus based Hono Command Router
org.eclipse.hono
- client-device-connection-infinispan
+ client-device-connection-base
+
org.eclipse.hono
hono-client-command-amqp
@@ -104,58 +105,4 @@
-
-
-
-
- io.fabric8
- docker-maven-plugin
-
-
-
-
-
- Command Router
-
-
- 5671
- 5672
- ${health.check.port}
-
-
-
-
-
-
-
-
-
-
-
-
-
- build-docker-image
-
-
-
- io.fabric8
- docker-maven-plugin
-
-
-
-
-
-
- build-native-image
-
-
-
- io.fabric8
- docker-maven-plugin
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/AdapterInstanceStatusService.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/AdapterInstanceStatusService.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/AdapterInstanceStatusService.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/AdapterInstanceStatusService.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandConsumerFactory.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandConsumerFactory.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandConsumerFactory.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandConsumerFactory.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandRouterAmqpServer.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandRouterAmqpServer.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandRouterAmqpServer.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandRouterAmqpServer.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandRouterMetrics.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandRouterMetrics.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandRouterMetrics.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandRouterMetrics.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandRouterResult.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandRouterResult.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandRouterResult.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandRouterResult.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandRouterService.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandRouterService.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandRouterService.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandRouterService.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandRouterServiceConfigProperties.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandRouterServiceConfigProperties.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandRouterServiceConfigProperties.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandRouterServiceConfigProperties.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandRouterServiceOptions.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandRouterServiceOptions.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandRouterServiceOptions.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandRouterServiceOptions.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandTargetMapper.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandTargetMapper.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/CommandTargetMapper.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/CommandTargetMapper.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/MicrometerBasedCommandRouterMetrics.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/MicrometerBasedCommandRouterMetrics.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/MicrometerBasedCommandRouterMetrics.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/MicrometerBasedCommandRouterMetrics.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/app/Application.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/app/AbstractApplication.java
similarity index 97%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/app/Application.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/app/AbstractApplication.java
index 44d98f5da5..49b482b58f 100644
--- a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/app/Application.java
+++ b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/app/AbstractApplication.java
@@ -86,20 +86,15 @@
import io.vertx.core.buffer.Buffer;
import io.vertx.ext.healthchecks.HealthCheckHandler;
import io.vertx.proton.sasl.ProtonSaslAuthenticatorFactory;
-import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
/**
* The Quarkus based Command Router main application class.
*/
-@ApplicationScoped
-public class Application extends NotificationSupportingServiceApplication {
+public abstract class AbstractApplication extends NotificationSupportingServiceApplication {
private static final String COMPONENT_NAME = "Hono Command Router";
- private static final Logger LOG = LoggerFactory.getLogger(Application.class);
-
- @Inject
- DeviceConnectionInfo deviceConnectionInfo;
+ private static final Logger LOG = LoggerFactory.getLogger(AbstractApplication.class);
@Inject
ProtonSaslAuthenticatorFactory saslAuthenticatorFactory;
@@ -349,16 +344,23 @@ public void registerReadinessChecks(final HealthCheckHandler handler) {
return endpoint;
}
+ /**
+ * Gets the repository storing device connection info.
+ *
+ * @return The device connection info repository.
+ */
+ protected abstract DeviceConnectionInfo getDeviceConnectionInfo();
+
private CommandRouterService commandRouterService() {
final DeviceRegistrationClient registrationClient = registrationClient();
final TenantClient tenantClient = tenantClient();
- final var commandTargetMapper = CommandTargetMapper.create(registrationClient, deviceConnectionInfo, tracer);
+ final var commandTargetMapper = CommandTargetMapper.create(registrationClient, getDeviceConnectionInfo(), tracer);
return new CommandRouterServiceImpl(
amqpServerProperties,
registrationClient,
tenantClient,
- deviceConnectionInfo,
+ getDeviceConnectionInfo(),
commandConsumerFactoryProvider(tenantClient, commandTargetMapper),
eventSenderProvider(),
adapterInstanceStatusService,
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/app/MetricsFactory.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/app/MetricsFactory.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/app/MetricsFactory.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/app/MetricsFactory.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/AbstractCommandProcessingQueue.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/AbstractCommandProcessingQueue.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/AbstractCommandProcessingQueue.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/AbstractCommandProcessingQueue.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/AbstractMappingAndDelegatingCommandHandler.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/AbstractMappingAndDelegatingCommandHandler.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/AbstractMappingAndDelegatingCommandHandler.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/AbstractMappingAndDelegatingCommandHandler.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/CommandProcessingQueue.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/CommandProcessingQueue.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/CommandProcessingQueue.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/CommandProcessingQueue.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/CommandRouterServiceImpl.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/CommandRouterServiceImpl.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/CommandRouterServiceImpl.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/CommandRouterServiceImpl.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/CommandTargetMapperImpl.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/CommandTargetMapperImpl.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/CommandTargetMapperImpl.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/CommandTargetMapperImpl.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/DelegatingCommandRouterAmqpEndpoint.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/DelegatingCommandRouterAmqpEndpoint.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/DelegatingCommandRouterAmqpEndpoint.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/DelegatingCommandRouterAmqpEndpoint.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/KubernetesBasedAdapterInstanceStatusService.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/KubernetesBasedAdapterInstanceStatusService.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/KubernetesBasedAdapterInstanceStatusService.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/KubernetesBasedAdapterInstanceStatusService.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/UnknownStatusProvidingService.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/UnknownStatusProvidingService.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/UnknownStatusProvidingService.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/UnknownStatusProvidingService.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedCommandConsumerFactoryImpl.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedCommandConsumerFactoryImpl.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedCommandConsumerFactoryImpl.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedCommandConsumerFactoryImpl.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedCommandProcessingQueue.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedCommandProcessingQueue.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedCommandProcessingQueue.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedCommandProcessingQueue.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedMappingAndDelegatingCommandHandler.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedMappingAndDelegatingCommandHandler.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedMappingAndDelegatingCommandHandler.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedMappingAndDelegatingCommandHandler.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/InternalKafkaTopicCleanupService.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/InternalKafkaTopicCleanupService.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/InternalKafkaTopicCleanupService.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/InternalKafkaTopicCleanupService.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaBasedCommandConsumerFactoryImpl.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaBasedCommandConsumerFactoryImpl.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaBasedCommandConsumerFactoryImpl.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaBasedCommandConsumerFactoryImpl.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaBasedMappingAndDelegatingCommandHandler.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaBasedMappingAndDelegatingCommandHandler.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaBasedMappingAndDelegatingCommandHandler.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaBasedMappingAndDelegatingCommandHandler.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaCommandProcessingQueue.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaCommandProcessingQueue.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaCommandProcessingQueue.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaCommandProcessingQueue.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedCommandConsumerFactoryImpl.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedCommandConsumerFactoryImpl.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedCommandConsumerFactoryImpl.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedCommandConsumerFactoryImpl.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedCommandProcessingQueue.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedCommandProcessingQueue.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedCommandProcessingQueue.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedCommandProcessingQueue.java
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedMappingAndDelegatingCommandHandler.java b/services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedMappingAndDelegatingCommandHandler.java
similarity index 100%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedMappingAndDelegatingCommandHandler.java
rename to services/command-router-base/src/main/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedMappingAndDelegatingCommandHandler.java
diff --git a/services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/CommandRouterServiceImplTest.java b/services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/CommandRouterServiceImplTest.java
similarity index 100%
rename from services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/CommandRouterServiceImplTest.java
rename to services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/CommandRouterServiceImplTest.java
diff --git a/services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/DelegatingCommandRouterAmqpEndpointTest.java b/services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/DelegatingCommandRouterAmqpEndpointTest.java
similarity index 100%
rename from services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/DelegatingCommandRouterAmqpEndpointTest.java
rename to services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/DelegatingCommandRouterAmqpEndpointTest.java
diff --git a/services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/KubernetesBasedAdapterInstanceStatusServiceTest.java b/services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/KubernetesBasedAdapterInstanceStatusServiceTest.java
similarity index 100%
rename from services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/KubernetesBasedAdapterInstanceStatusServiceTest.java
rename to services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/KubernetesBasedAdapterInstanceStatusServiceTest.java
diff --git a/services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedMappingAndDelegatingCommandHandlerTest.java b/services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedMappingAndDelegatingCommandHandlerTest.java
similarity index 100%
rename from services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedMappingAndDelegatingCommandHandlerTest.java
rename to services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/amqp/ProtonBasedMappingAndDelegatingCommandHandlerTest.java
diff --git a/services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/kafka/InternalKafkaTopicCleanupServiceTest.java b/services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/kafka/InternalKafkaTopicCleanupServiceTest.java
similarity index 100%
rename from services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/kafka/InternalKafkaTopicCleanupServiceTest.java
rename to services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/kafka/InternalKafkaTopicCleanupServiceTest.java
diff --git a/services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaBasedMappingAndDelegatingCommandHandlerTest.java b/services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaBasedMappingAndDelegatingCommandHandlerTest.java
similarity index 100%
rename from services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaBasedMappingAndDelegatingCommandHandlerTest.java
rename to services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaBasedMappingAndDelegatingCommandHandlerTest.java
diff --git a/services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaCommandProcessingQueueTest.java b/services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaCommandProcessingQueueTest.java
similarity index 100%
rename from services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaCommandProcessingQueueTest.java
rename to services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/kafka/KafkaCommandProcessingQueueTest.java
diff --git a/services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedMappingAndDelegatingCommandHandlerTest.java b/services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedMappingAndDelegatingCommandHandlerTest.java
similarity index 100%
rename from services/command-router/src/test/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedMappingAndDelegatingCommandHandlerTest.java
rename to services/command-router-base/src/test/java/org/eclipse/hono/commandrouter/impl/pubsub/PubSubBasedMappingAndDelegatingCommandHandlerTest.java
diff --git a/services/command-router/src/test/resources/application.yml b/services/command-router-base/src/test/resources/application.yml
similarity index 100%
rename from services/command-router/src/test/resources/application.yml
rename to services/command-router-base/src/test/resources/application.yml
diff --git a/services/command-router-infinispan/pom.xml b/services/command-router-infinispan/pom.xml
new file mode 100644
index 0000000000..bfbcb5e456
--- /dev/null
+++ b/services/command-router-infinispan/pom.xml
@@ -0,0 +1,92 @@
+
+
+ 4.0.0
+
+ org.eclipse.hono
+ hono-services-parent
+ 2.6.0-SNAPSHOT
+ ../parent
+
+ hono-service-command-router-infinispan
+ Hono Infinispan Based Command Router
+ A Quarkus based implementation of Hono's Command Router API that is using Infinispan for storing data.
+
+
+
+ org.eclipse.hono
+ hono-service-command-router-base
+
+
+
+ org.eclipse.hono
+ client-device-connection-infinispan
+
+
+
+
+
+
+
+ io.fabric8
+ docker-maven-plugin
+
+
+
+
+
+ Command Router
+
+
+ 5671
+ 5672
+ ${health.check.port}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ build-docker-image
+
+
+
+ io.fabric8
+ docker-maven-plugin
+
+
+
+
+
+
+ build-native-image
+
+
+
+ io.fabric8
+ docker-maven-plugin
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/services/command-router-infinispan/src/main/java/org/eclipse/hono/commandrouter/infinispan/app/Application.java b/services/command-router-infinispan/src/main/java/org/eclipse/hono/commandrouter/infinispan/app/Application.java
new file mode 100644
index 0000000000..c62cc3c59f
--- /dev/null
+++ b/services/command-router-infinispan/src/main/java/org/eclipse/hono/commandrouter/infinispan/app/Application.java
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.eclipse.hono.commandrouter.infinispan.app;
+
+import org.eclipse.hono.commandrouter.app.AbstractApplication;
+import org.eclipse.hono.deviceconnection.common.DeviceConnectionInfo;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+
+/**
+ * The Quarkus based Command Router main application class (Infinispan variant).
+ */
+@ApplicationScoped
+public class Application extends AbstractApplication {
+
+ @Inject
+ DeviceConnectionInfo deviceConnectionInfo;
+
+ @Override
+ protected DeviceConnectionInfo getDeviceConnectionInfo() {
+ return deviceConnectionInfo;
+ }
+}
diff --git a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/app/DeviceConnectionInfoProducer.java b/services/command-router-infinispan/src/main/java/org/eclipse/hono/commandrouter/infinispan/app/InfinispanDeviceConnectionInfoProducer.java
similarity index 96%
rename from services/command-router/src/main/java/org/eclipse/hono/commandrouter/app/DeviceConnectionInfoProducer.java
rename to services/command-router-infinispan/src/main/java/org/eclipse/hono/commandrouter/infinispan/app/InfinispanDeviceConnectionInfoProducer.java
index 736235996f..072c8134ac 100644
--- a/services/command-router/src/main/java/org/eclipse/hono/commandrouter/app/DeviceConnectionInfoProducer.java
+++ b/services/command-router-infinispan/src/main/java/org/eclipse/hono/commandrouter/infinispan/app/InfinispanDeviceConnectionInfoProducer.java
@@ -12,7 +12,7 @@
*/
-package org.eclipse.hono.commandrouter.app;
+package org.eclipse.hono.commandrouter.infinispan.app;
import java.io.IOException;
import java.nio.file.Files;
@@ -55,9 +55,9 @@
* on whether a remote cache config with a non-empty server list is used or not.
*/
@ApplicationScoped
-public class DeviceConnectionInfoProducer {
+public class InfinispanDeviceConnectionInfoProducer {
- private static final Logger LOG = LoggerFactory.getLogger(DeviceConnectionInfoProducer.class);
+ private static final Logger LOG = LoggerFactory.getLogger(InfinispanDeviceConnectionInfoProducer.class);
@ConfigProperty(name = "hono.commandRouter.cache.embedded.configurationFile", defaultValue = "/etc/hono/cache-config.xml")
String configFile;
diff --git a/services/command-router/src/main/resources/META-INF/native-image/org.eclipse.hono/hono-service-command-router/native-image.properties b/services/command-router-infinispan/src/main/resources/META-INF/native-image/org.eclipse.hono/hono-service-command-router/native-image.properties
similarity index 100%
rename from services/command-router/src/main/resources/META-INF/native-image/org.eclipse.hono/hono-service-command-router/native-image.properties
rename to services/command-router-infinispan/src/main/resources/META-INF/native-image/org.eclipse.hono/hono-service-command-router/native-image.properties
diff --git a/services/command-router/src/main/resources/application-dev.properties b/services/command-router-infinispan/src/main/resources/application-dev.properties
similarity index 100%
rename from services/command-router/src/main/resources/application-dev.properties
rename to services/command-router-infinispan/src/main/resources/application-dev.properties
diff --git a/services/command-router/src/main/resources/application.properties b/services/command-router-infinispan/src/main/resources/application.properties
similarity index 100%
rename from services/command-router/src/main/resources/application.properties
rename to services/command-router-infinispan/src/main/resources/application.properties
diff --git a/services/command-router/src/main/resources/default_banner.txt b/services/command-router-infinispan/src/main/resources/default_banner.txt
similarity index 92%
rename from services/command-router/src/main/resources/default_banner.txt
rename to services/command-router-infinispan/src/main/resources/default_banner.txt
index ee1eac25ce..6ff38647e3 100644
--- a/services/command-router/src/main/resources/default_banner.txt
+++ b/services/command-router-infinispan/src/main/resources/default_banner.txt
@@ -8,7 +8,7 @@
| |
|_|
-Eclipse Hono Command Router
+Eclipse Hono Infinispan Based Command Router
Go to https://www.eclipse.org/hono for more information.
diff --git a/services/pom.xml b/services/pom.xml
index 416fc18f64..4af2a47055 100644
--- a/services/pom.xml
+++ b/services/pom.xml
@@ -30,7 +30,8 @@
auth
auth-base
base-jdbc
- command-router
+ command-router-base
+ command-router-infinispan
device-registry-base
device-registry-jdbc
device-registry-mongodb
diff --git a/tests/pom.xml b/tests/pom.xml
index b7466c33bc..a861133063 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -85,7 +85,7 @@
Command Router related properties.
-->
clustered-cache
- hono-service-command-router
+ hono-service-command-router-infinispan
300000000
${default.java-options}
@@ -264,7 +264,7 @@
org.eclipse.hono
- hono-service-command-router
+ hono-service-command-router-base
test