pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jiazhai commented on a change in pull request #2400: PIP-22: Dead Letter Topic
Date Fri, 24 Aug 2018 03:26:31 GMT
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message