-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
childContainer of previous run is stopping ConcurrentContainer after a new start #3448
Comments
What are your
This indeed must not happen. Does it happen even in previous versions, even before your recent changes? |
I have not introduced any bugs. Current bug is a different one. It is existing in previous versions also. I have provided JUnit to replicate this scenario. Please review and suggest if this a valid scenario and needs to be fixed. |
These are steps to be followed to get the overview of bug. These are not different scenarios. Please let me know, if I have to provide more information regarding this issue. This bug is not because of my changes. |
No problem! I will need more time to investigate this. |
If you are ok, I will try to fix the issue and provide the PR. I am having some idea on it. |
[DRAFT] Fixes #spring-projectsGH-3448 spring-projects#3448 Issue: Fenced Child Container could stop the running ConcurrentContainer Fix: Configure KafkaMessageListenerContainer (KMLC) to use ConcurrentMessagleListenerContainerRef instead ofConcurrentContainer. Internally, ConcurrentContainerRef checks if KMLC is fenced when stop operations are called on Concurrent Container. If KMLC is fenced, suppress the `stop` related operations. If KMLC is not fenced, delegate the stop call to ConcurrentContainer.
In what version(s) of Spring for Apache Kafka are you seeing this issue?
3.3
Describe the bug
If a ConcurrentContainer is stopped, then the child container should not be allowed to stop ConcurrentContainer. But, there are some scenarios where it is possible.
Scenario:
Concurrency: 2
ConcurrentContainer:: CMain
Child containers: C0, C1.
ConcurrentContainer
started.CMain -- running.
C0 -- running.
C1 -- running.
ConcurrentContainer
stopped.CMain -- not running.
C0 -- delinked. (message processing is happening)
C1 -- delinked.
ConcurrentContainer
started. This is permitted sincestop
is called before. Nothing wrong here. It should be allowed. Only the practise is not correct.CMain -- running.
C2 -- running.
C3 -- running.
C0 -- delinked. (message processing is happening)
C0
has thrown error while processing. This would stop the runningConcurrentContainer
!!!!CMain -- not running.
C2 -- delinked.
C3 -- delinked.
C0 -- delinked.
To Reproduce
Please suggest if this is a valid scenario.
The text was updated successfully, but these errors were encountered: