ConsumerGroupMetadata is internal and there is no (clean) way for an external library to wrap it
See original GitHub issueIConsumerGroupMetadata
is an empty interface, that does not have a public property/method to access the metadata itself, while ConsumerGroupMetadata
has an internal field containing the serialized version of metadata.
Due to this design, the only way to get metadata of a consumer group is to cast IConsumerGroupMetadata
to ConsumerGroupMetadata
.
A better way to do it would be to have a public property to get metadata as byte[]
in IConsumerGroupMetadata
itself.
Please, consider this change.
P.S. I will try to do these changes in my free time, but maybe there is a samaritan that could do this now.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
java.lang.ClassNotFoundException: org.apache.kafka. ...
I am getting the following error when I try to run my application. Caused by: java.lang.ClassNotFoundException: org.apache.kafka.clients.
Read more >Wrapping third party library is best practice [duplicate]
When you wrap a third-party API, you minimize your dependencies upon it: You can choose to move to a different library in the...
Read more >[Clean Practices] - Avoid your code marrying 3rd party ...
Consider pushing all facade wrapping external library to a new package all together. This way its pretty easy to change/upgrade the external ......
Read more >I'm trying to wrap my mind around what is considered ...
Hey Courtney, you will be fine to import in Collections, they are part of the JDK version that you download, so considered an...
Read more >How to setup Composer and use external libraries in ...
Another problem of wrapping packages is that you cannot get updates without the wrapping module being updated. There is also lot's of tooling ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I get your point, and partially agree with you on this point; however, let’s consider my case. I am trying to develop a service using Kafka. I do not want to leave Kafka dependencies in the public API of the service (maybe it will be change in the future, who knows), so I tried to wrap all the components that I need under my own public API (consumer, producer, message, etc.). The only problem that I faced till now is that I cannot wrap the
ICosumerGroupMetadata
since it does not let me get the metadata itself from my service (bothConsumerGroupMetadata
and variable storing metadata are internal).So, what I find missing is a public method that would let me get the metadata as
byte[]
.the java client actually exposes information on the instance returned from
groupMetadata
, which is what is passed to the transactional producer. whether on not this is really useful (seems like @agayev169 want’s it), our api does expose less than the Java one does.