You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/19 02:37:25 UTC
[GitHub] [pulsar] BewareMyPower edited a comment on issue #12087: PIP 96: Payload converter for Pulsar client
BewareMyPower edited a comment on issue #12087:
URL: https://github.com/apache/pulsar/issues/12087#issuecomment-922405741
@eolivelli `ConsumerBuilder` is a class in **pulsar-client-api** module that has no dependency. If **pulsar-common** was added as the dependency of **pulsar-client-api**, cyclic dependency would happen.
```
org.apache.pulsar:pulsar-common:jar:2.9.0-SNAPSHOT
+- org.apache.pulsar:pulsar-client-api:jar:2.9.0-SNAPSHOT:compile
```
Also we can't put `PayloadConverter` into **pulsar-client-api** package because we must import `BrokerEntryMetadata` and `MessageMetadata` from **pulsar-common** package.
If we changed the `PayloadConverter` interface to
```java
interface PayloadConverter {
ByteBuf convert(ByteBuf headerAndPayload);
}
```
Maybe it could work, but we need to parse `BrokerEntryMetadata` and `MessageMetadata` repeatedly in all valid implementations. BTW, we need to import netty dependency for `ByteBuf`. I'm not sure if it's proper for **pulsar-client-api** package to do that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org