GitHub user ragaur-tibco edited a comment on the discussion: intermittent 
Messages loss while consuming the messages from consumer

@lhotari 

I have used the below config for consumer
"topic"="topic name"
"subscriptionName"=subscriptionName
"replicateSubscriptionState"=false
"subscriptionType"= SubscriptionType.Shared

"negativeAckRedeliveryDelay" = 60
"maxRedeliverCount"=10
"deadLetterTopic"= null

NOTE:  I didn't provide the DLQ but used the below code to receive the messages:

```
>consumerStringBuilder.negativeAckRedeliveryDelay(60, TimeUnit.SECONDS);

> consumerStringBuilder.deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(10).deadLetterTopic(null).build());

> Consumer<String> stringConsumer= consumerStringBuilder.subscribe();

> Message msg = stringConsumer.receive(); 
```

@lhotari can you please confirm if above use-case is correct or not? 
and can you please confirm do we need to provide the DLQ-topic for above 
similar use-cases?

NOTE: When the producer and consumer are running simultaneously, the consumer 
is able to consume all the messages, whereas if the consumer and producer are 
running separately, the consumer is not able to consume messages there were 
some messages loss

GitHub link: 
https://github.com/apache/pulsar/discussions/22681#discussioncomment-9370404

----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscr...@pulsar.apache.org

Reply via email to