merlimat commented on a change in pull request #1136: Read compacted consumer
flag
URL: https://github.com/apache/incubator-pulsar/pull/1136#discussion_r166123889
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
##########
@@ -383,10 +384,15 @@ public void removeProducer(Producer producer) {
@Override
public CompletableFuture<Consumer> subscribe(final ServerCnx cnx, String
subscriptionName, long consumerId,
SubType subType, int priorityLevel, String consumerName, boolean
isDurable, MessageId startMessageId,
- Map<String, String> metadata) {
+ Map<String, String> metadata, boolean readCompacted) {
final CompletableFuture<Consumer> future = new CompletableFuture<>();
+ if (readCompacted && !(subType == SubType.Failover || subType ==
SubType.Exclusive)) {
Review comment:
This we should also validate in client side, so that we don't keep hitting
brokers when the consumer config is invalid.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services