From 51a205bfcaede6c1296bf27eca435201b96f4f08 Mon Sep 17 00:00:00 2001 From: SravanThotakura05 <83568543+SravanThotakura05@users.noreply.github.com> Date: Wed, 17 Jul 2024 13:54:20 +0530 Subject: [PATCH] Fix failing tests --- .../incoming/SolaceDirectMessageIncomingChannel.java | 6 +++--- .../quarkus/messaging/incoming/SolaceIncomingChannel.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/quarkus-solace-messaging-connector/runtime/src/main/java/com/solace/quarkus/messaging/incoming/SolaceDirectMessageIncomingChannel.java b/quarkus-solace-messaging-connector/runtime/src/main/java/com/solace/quarkus/messaging/incoming/SolaceDirectMessageIncomingChannel.java index 2f04edb..2e2df71 100644 --- a/quarkus-solace-messaging-connector/runtime/src/main/java/com/solace/quarkus/messaging/incoming/SolaceDirectMessageIncomingChannel.java +++ b/quarkus-solace-messaging-connector/runtime/src/main/java/com/solace/quarkus/messaging/incoming/SolaceDirectMessageIncomingChannel.java @@ -83,9 +83,6 @@ public SolaceDirectMessageIncomingChannel(Vertx vertx, SolaceConnectorIncomingCo boolean lazyStart = ic.getClientLazyStart(); this.ackHandler = null; - if (ic.getConsumerErrorTopic().isEmpty()) { - throw ex.illegalArgumentInvalidFailureStrategy(SolaceFailureHandler.Strategy.ERROR_TOPIC.name()); - } this.failureHandler = createFailureHandler(ic, solace); // TODO Here use a subscription receiver.receiveAsync with an internal queue @@ -161,6 +158,9 @@ private SolaceFailureHandler createFailureHandler(SolaceConnectorIncomingConfigu case IGNORE: return new SolaceIgnoreFailure(ic.getChannel()); case ERROR_TOPIC: + if (ic.getConsumerErrorTopic().isEmpty()) { + throw ex.illegalArgumentInvalidFailureStrategy(strategy); + } return new SolaceErrorTopic(ic.getChannel(), ic.getConsumerErrorTopic().get(), ic.getConsumerErrorMessageDmqEligible(), ic.getConsumerErrorMessageTtl().orElse(null), ic.getConsumerErrorMessageMaxDeliveryAttempts(), null, solace); diff --git a/quarkus-solace-messaging-connector/runtime/src/main/java/com/solace/quarkus/messaging/incoming/SolaceIncomingChannel.java b/quarkus-solace-messaging-connector/runtime/src/main/java/com/solace/quarkus/messaging/incoming/SolaceIncomingChannel.java index 6dcad64..9cdf7e6 100644 --- a/quarkus-solace-messaging-connector/runtime/src/main/java/com/solace/quarkus/messaging/incoming/SolaceIncomingChannel.java +++ b/quarkus-solace-messaging-connector/runtime/src/main/java/com/solace/quarkus/messaging/incoming/SolaceIncomingChannel.java @@ -105,9 +105,6 @@ public SolaceIncomingChannel(Vertx vertx, SolaceConnectorIncomingConfiguration i this.receiver = builder.build(getQueue(ic)); boolean lazyStart = ic.getClientLazyStart(); this.ackHandler = new SolaceAckHandler(receiver); - if (ic.getConsumerErrorTopic().isEmpty()) { - throw ex.illegalArgumentInvalidFailureStrategy(SolaceFailureHandler.Strategy.ERROR_TOPIC.name()); - } this.failureHandler = createFailureHandler(ic, solace); // TODO Here use a subscription receiver.receiveAsync with an internal queue @@ -186,6 +183,9 @@ private SolaceFailureHandler createFailureHandler(SolaceConnectorIncomingConfigu case DISCARD: return new SolaceDiscard(ic.getChannel(), receiver); case ERROR_TOPIC: + if (ic.getConsumerErrorTopic().isEmpty()) { + throw ex.illegalArgumentInvalidFailureStrategy(strategy); + } return new SolaceErrorTopic(ic.getChannel(), ic.getConsumerErrorTopic().get(), ic.getConsumerErrorMessageDmqEligible(), ic.getConsumerErrorMessageTtl().orElse(null), ic.getConsumerErrorMessageMaxDeliveryAttempts(), null, solace);