Skip to content

Use Duration, DataSize and boxed types in PulsarProperties #191

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 2 commits into from
Nov 4, 2022

Conversation

cbornet
Copy link
Contributor

@cbornet cbornet commented Nov 3, 2022

See #119


/**
* Pattern for topics the consumer subscribes to.
*/
private String topicsPattern;
private Pattern topicsPattern;
Copy link
Contributor Author

@cbornet cbornet Nov 3, 2022

Choose a reason for hiding this comment

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

Used Pattern here since SB knows how to bind it

@@ -111,12 +112,12 @@ public static class Consumer {
/**
* Comma-separated list of topics the consumer subscribes to.
*/
private String[] topics;
private Set<String> topics;
Copy link
Contributor Author

@cbornet cbornet Nov 3, 2022

Choose a reason for hiding this comment

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

Used Set here since SB knows how to bind it.

@cbornet cbornet force-pushed the client-config branch 2 times, most recently from e0d090c to fda0022 Compare November 3, 2022 12:07
@@ -210,7 +210,7 @@ void customProducerInterceptorsOrderedProperly() {
void consumerBatchPropertiesAreHonored() {
contextRunner
.withPropertyValues("spring.pulsar.listener.max-num-messages=10",
"spring.pulsar.listener.max-num-bytes=101", "spring.pulsar.listener.batch-timeout-millis=50")
"spring.pulsar.listener.max-num-bytes=101B", "spring.pulsar.listener.batch-timeout=50ms")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we document these new formats in the doc?

Copy link
Collaborator

@onobc onobc Nov 3, 2022

Choose a reason for hiding this comment

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

I think we are fine here as these should be self documenting in that they are config props and the doc is auto-generated. Also, using these types for Spring Boot config props is somewhat of a standard (or at least it is well-known to users).

@sobychacko
Copy link
Collaborator

@cbornet Overall, I like the approach that you took. Thank you for doing this cleanup. I added a minor doc comment above.

Copy link
Collaborator

@onobc onobc left a comment

Choose a reason for hiding this comment

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

I'm so glad you did this @cbornet . Thank you. Minor things to address.

@cbornet cbornet closed this Nov 4, 2022
@cbornet cbornet reopened this Nov 4, 2022
@onobc onobc merged commit b4203be into spring-projects:main Nov 4, 2022
@cbornet cbornet deleted the client-config branch November 4, 2022 13:11
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.

3 participants