Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SravanThotakura05 committed Jul 17, 2024
1 parent b6aa984 commit 51a205b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 51a205b

Please sign in to comment.