gmethvin commented on a change in pull request #9440:
URL: https://github.com/apache/pulsar/pull/9440#discussion_r597308379
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/BatchMessageIdImpl.java
##########
@@ -18,17 +18,11 @@
*/
package org.apache.pulsar.client.impl;
-import com.google.common.collect.ComparisonChain;
import org.apache.pulsar.client.api.MessageId;
/**
*/
public class BatchMessageIdImpl extends MessageIdImpl {
- private final static int NO_BATCH = -1;
- private final int batchIndex;
Review comment:
Not sure I completely understand. So you think we should have another
interface for `BatchMessageId`?
The core issue we're solving here is that it's possible to have both
`MessageIdImpl` and `BatchMessageIdImpl` instances that refer to a single
unbatched message. By moving the fields to `MessageIdImpl`, we can implement
equals/hashCode in `MessageIdImpl` and have it work for the subclass
`BatchMessageIdImpl`. There are other ways of achieving that I suppose, but
since it wasn't public API I just did it that way because it seemed simpler.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]