-
Notifications
You must be signed in to change notification settings - Fork 68
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
Conversation
|
||
/** | ||
* Pattern for topics the consumer subscribes to. | ||
*/ | ||
private String topicsPattern; | ||
private Pattern topicsPattern; |
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.
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; |
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.
Used Set
here since SB knows how to bind it.
e0d090c
to
fda0022
Compare
fda0022
to
0249503
Compare
@@ -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") |
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.
Should we document these new formats in the doc?
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.
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).
@cbornet Overall, I like the approach that you took. Thank you for doing this cleanup. I added a minor doc comment above. |
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.
I'm so glad you did this @cbornet . Thank you. Minor things to address.
See #119