Stream queue: consumers are active by default #13063
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Without this change, consumers using protocols other than the stream protocol would display as inactive in the Management UI/API and CLI commands, even though they were receiving messages.
Here's a screenshot before, with 2 stream-perf-test (one using SAC, the other not) and 1 consumer for AMQP 0.9.1, AMQP 1.0 and STOMP. You can see that only 2 consumers appear to be active, while in fact 5 were receiving messages (all except 2 non-active SAC consumers).
![before](https://private-user-images.githubusercontent.com/9566114/402602826-04c9d051-c2a0-4e1b-9b30-0c5a3c3f0562.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzYyMTgsIm5iZiI6MTczODkzNTkxOCwicGF0aCI6Ii85NTY2MTE0LzQwMjYwMjgyNi0wNGM5ZDA1MS1jMmEwLTRlMWItOWIzMC0wYzVhM2MzZjA1NjIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTM0NTE4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NjMxNzI5ZDEzOTBmNGQ4YWRlNjg1MWQwMzRkNzIxZWYwMmQzMDZkZDYwYTkyMjdlN2MxMTc2NWE0MWM3MWNjNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.ptKieAcs_xajxfR2b_4IynZ5cJVqlSTxD_96oVHKI3A)
With this change and with the same clients running, we can indeed see 5 active consumers:
![after](https://private-user-images.githubusercontent.com/9566114/402602857-778df76e-06da-47bb-a3b3-cbb976c88624.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzYyMTgsIm5iZiI6MTczODkzNTkxOCwicGF0aCI6Ii85NTY2MTE0LzQwMjYwMjg1Ny03NzhkZjc2ZS0wNmRhLTQ3YmItYTNiMy1jYmI5NzZjODg2MjQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTM0NTE4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NWY3MWY0MWFjMjI4N2JmZTkxMTk0MGUxZmFmNTgzODc2NGY3N2U0YTA0ODIyZDk0MTU2MTcwMjcyYzQ3ODkzNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.7zXzP2OkAEot7Q5dlkcCpToTLkvCRUIhleH_lMFt1hs)