-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add Apache Pulsar support #16
Conversation
Supplier<CompletionStage<Map<Integer, Long>>> offsetsProvider | ||
) { | ||
return Mono | ||
.defer(() -> Mono.fromCompletionStage(((PulsarClientImpl) pulsarClient).getNumberOfPartitions(topic))) |
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.
why so many casts? :)
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.
Ask Pulsar guys :D
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.
For some reason this method is not a part of the interface
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 just saw this what is the project trying to do ?
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.
For some reason this method is not a part of the interface
Pulsar tries to hide the "partitions" complexity from the users in its unified messaging model. Applications don't have to know the "partitions" under the hood. That's why it was not part of the interface.
alternatively, you can use PulsarAdmin for querying the partition metadata : https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Topics.java#L263
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.
@aahmed-se we're using Liiklus at https://www.vivy.com as our CQRS gateway. Currently we run it with Kafka but plan to deploy Pulsar next to Kafka and move some of our workloads as a first step (with kafka-to-pulsar replication), this is why I added Pulsar support to Liiklus :)
@sijie I see. Thanks for explanation! I was using pulsar-kafka-compat as a ref, this is where I found this code. I didn't want to use PulsarAdmin given its "admin" functionality (and also another transport)
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.
} | ||
|
||
@Override | ||
public boolean equals(Object o) { |
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 be hashcode implemented too?
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.
Works like that, only implemented because of the tests
# Conflicts: # tck/src/main/java/com/github/bsideup/liiklus/records/tests/ConsumerGroupTest.java
No description provided.