rdhabalia commented on a change in pull request #2400: PIP-22: Dead Letter Topic
URL: https://github.com/apache/incubator-pulsar/pull/2400#discussion_r212497198
##########
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:
umm.. this can cause in high gc for broker. Essentially we would like to
avoid storing objects in heap with relatively some what long life-cycle.
therefore, in past release we had an effort to clean up storing PositionImp
objects from code base. so, for broker serving high throughput with low latency
requirement might want to having this feature.
----------------------------------------------------------------
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