Skip to content

Conversation

@klesaulnier
Copy link
Contributor

PR Summary

Signed-off-by: LE SAULNIER Kevin <kevin.lesaulnier.pro@gmail.com>
klesaulnier and others added 5 commits February 6, 2026 13:16
Signed-off-by: LE SAULNIER Kevin <kevin.lesaulnier.pro@gmail.com>
Signed-off-by: LE SAULNIER Kevin <kevin.lesaulnier.pro@gmail.com>
Signed-off-by: LE SAULNIER Kevin <kevin.lesaulnier.pro@gmail.com>
Signed-off-by: LE SAULNIER Kevin <kevin.lesaulnier.pro@gmail.com>
@klesaulnier klesaulnier changed the title [WIP] POC for rabbitmq loadbalancing POC for rabbitmq loadbalancing Feb 6, 2026
@klesaulnier klesaulnier changed the title POC for rabbitmq loadbalancing RabbitMQ messages loadbalancing Feb 6, 2026
*/
@Bean
public ListenerContainerCustomizer<MessageListenerContainer> customizer() {
AtomicInteger index = new AtomicInteger();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add comment here that we are inspired with the atomicinteger capture by the lambda by spring cloud stream when it sets the consumerTagPrefix of the different consumers of a container

Or at least a comment saying that we expect spring cloud stream to call our customizer (lambda) exactly once in order for each container so it will produce a sequence of increasing priorities

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@Bean
@Override
public Consumer<Message<String>> consumeRun() {
public Consumer<Message<String>> consumeRun1() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment here to explain the design and why we do it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

consumer:
concurrency: 4
max-attempts: 1
consumeRun2-in-0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment here quickly reexplaining the design and why we do it this way

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

quorum:
enabled: true
delivery-limit: 2
consumeRun2-in-0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another comment here to see the previous one on the design

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

cloud:
function:
# disable consumeRun2/3/4 during test - all of them receive the "loadflowGroup" messages otherwise
definition: consumeRun1;consumeCancel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HMm that's a shame. It's because of the testbinder instead of rabbitmq binder ? Maybe add more detail explaining this, and why it's good to just disable the other functions, say that the beans are created but not used, etc. Should we add back the concurrency 4 during test also or something else ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking TestChannelBinderProvisioner.provisionConsumerDestination, ConsumerProperties as well as group seem to be ignored

Signed-off-by: LE SAULNIER Kevin <kevin.lesaulnier.pro@gmail.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants