jiazhai commented on a change in pull request #2400: PIP-22: Dead Letter Topic
URL: https://github.com/apache/incubator-pulsar/pull/2400#discussion_r212513063
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherMultipleConsumers.java
 ##########
 @@ -88,20 +100,32 @@
     private final ServiceConfiguration serviceConfig;
     private DispatchRateLimiter dispatchRateLimiter;
 
+    protected volatile int maxRedeliveryCount;
+    protected volatile String deadLetterTopic;
+    protected RedeliveryTracker redeliveryTracker;
+    private volatile ProducerImpl<byte[]> deadLetterTopicProducer;
+
     enum ReadType {
         Normal, Replay
     }
 
-    public PersistentDispatcherMultipleConsumers(PersistentTopic topic, 
ManagedCursor cursor) {
+    public PersistentDispatcherMultipleConsumers(PersistentTopic topic, 
ManagedCursor cursor, int maxRedeliveryCount,
+                                                 String deadLetterTopic) {
         this.cursor = cursor;
         this.name = topic.getName() + " / " + Codec.decode(cursor.getName());
         this.topic = topic;
         this.messagesToReplay = new ConcurrentLongPairSet(512, 2);
+        this.messagesToDeadLetter = new HashSet<>(8);
 
 Review comment:
   +1, @codelipenghui, we may need following the way  of `messagesToReplay`, 
which store ledgerId and entryId as primitive value, and then compose a 
Position from(ledgerId + entryId) when using it.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to