allthingssecurity commented on PR #28320:
URL: https://github.com/apache/camel/pull/28320#issuecomment-6363280676
@davsclaus done in 3fe5f7b1519e. The catch-all in `NatsConsumingTask.run`
now logs at DEBUG ("Not consuming from topic ... as the consumer is stopping")
when `!isRunAllowed()`, as the keeper of #28318 does in `consumerDeleted`.
Otherwise it reports "Error during processing" to the exception handler as
before.
New test `stopWhileSubscribingIsNotReportedAsAnError`: the consumer is
stopped from inside the fake server's subscribe, so the subscribe is refused
with "Dispatcher is closed", and the test checks that nothing reaches the
exception handler (the default one is what logs the WARN). Without the change
it fails with `reported: [java.lang.IllegalStateException: Dispatcher is
closed]`.
Tests (offline, `-DskipITs`): camel-nats unit tests 9 run, 0 failures.
Merged with #28318's branch: 22 run, 0 failures. `git merge-tree` is clean
against #28318's branch, #28204's branch and main. #28318 and #28204 still
conflict with each other in `NatsConsumer.java`, as before this commit, and
this commit adds nothing to those hunks.
The guard checks the consumer, not the run. If the same consumer is stopped
and started in place while the first run's subscribe is still in progress, that
refused subscribe is still logged at WARN. This is the same gap as your nit on
#28318, and it is in the same follow-up draft.
_Claude Code on behalf of allthingssecurity_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]