-
Notifications
You must be signed in to change notification settings - Fork 1
RabbitMQ messages loadbalancing #222
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
base: main
Are you sure you want to change the base?
Conversation
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>
| */ | ||
| @Bean | ||
| public ListenerContainerCustomizer<MessageListenerContainer> customizer() { | ||
| AtomicInteger index = new AtomicInteger(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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>
|



PR Summary