Skip to content

Add useKeyOrderedProcessing option to DefaultReactivePulsarMessageListenerContainer #205

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

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

cbornet
Copy link
Contributor

@cbornet cbornet commented Nov 16, 2022

No description provided.

.concurrent().concurrency(containerProperties.getConcurrency())
.maxInflight(containerProperties.getMaxInFlight());
if (containerProperties.isUseKeyOrderedProcessing()) {
concurrentPipelineBuilder.useKeyOrderedProcessing();
Copy link
Collaborator

Choose a reason for hiding this comment

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

[NOT-DIRECTLY-RELATED-WISHLIST] The fluent builder syntax is great.... until you have to do something conditionally. I want to explore a builder of the form field(T) and fieldIf(Supplier<T>, Condition<T>) sometime.

Ok, please resolve this comment once digested. Just sharing thoughts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -49,6 +49,8 @@

private int maxInFlight = 0;

private boolean useKeyOrderedProcessing = false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This reminds me that there is probably nothing stopping us from turning this into a simple record.

@@ -158,7 +160,8 @@ void containerProperties() throws Exception {

assertThat(container).extracting("pipeline", InstanceOfAssertFactories.type(ReactiveMessagePipeline.class))
.hasFieldOrPropertyWithValue("concurrency", 5).hasFieldOrPropertyWithValue("maxInflight", 6)
.hasFieldOrPropertyWithValue("handlingTimeout", Duration.ofMillis(7));
.hasFieldOrPropertyWithValue("handlingTimeout", Duration.ofMillis(7)).extracting("groupingFunction")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Later we should consider breaking this test into smaller pieces as it is not directly clear that "setUseKeyOrderedProcessing" equates to "groupFunction == DMGF".

@onobc onobc merged commit fb39737 into spring-projects:main Nov 16, 2022
@cbornet cbornet deleted the concurrent-grouping branch November 16, 2022 21:12
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