GROUP-91 Missing Events - RabbitMQ Fan-Out Misconfiguration #20
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.
Description of Changes
Issue noticed in production where a client would not receive all relevant events. Upon further investigating the RabbitMQ exchange, it looks like consumers are sharing one queue, instead of each having their own which is the intended behavior. This change assigns a random identifier suffix to each instance's configured queue, which Spring Cloud Stream will create on startup.
The random value used is auto-generated and injected by Spring Boot.
Concerns
Something like this should ideally be caught by automated testing. For example, we should run a simulated testing environment with multiple users, and several events (in the order of 100s) to expect. The environment should be setup such that there are multiple replicas of services to test the distributed nature of cloud native applications. That deserves its own issue, available here.