Hi, I'm stuck because I don't understand how to co...
# general
g
Hi, I'm stuck because I don't understand how to consume DLQ message (or creation of DLQ topic). I ran pulsar with this command :
Copy code
docker run -it -p 6650:6650 -p 8080:8080 -e TZ=Europe/Paris --mount source=pulsardata,target=/pulsar/data --mount source=pulsarconf,target=/pulsar/conf apachepulsar/pulsar:3.0.17 bin/pulsar standalone --advertised-address localhost
Then I have these 3 java files, I run SimpleConsumerWithRetry, and gets logs :
Copy code
>> pulsar client created
>> pulsar DLQ consumer created
>> pulsar consumer created
Then I run SimpleProducer, here the logs
Copy code
>> pulsar client created
>> pulsar producer created
deliver msg 9:1:-1, value:Message de 2026-05-28T19:00:43.731+02
Then I look at the log of SimpleConsumerWithRetry :
Copy code
2026-05-28T19:00:43.798+02: receive msg 9:1:-1, value:Message de 2026-05-28T19:00:43.731+02
2026-05-28T19:00:45.902+02: receive msg 18:0:-1, value:Message de 2026-05-28T19:00:43.731+02
2026-05-28T19:00:48.899+02: receive msg 18:1:-1, value:Message de 2026-05-28T19:00:43.731+02
So far so good : 2 retries, with 2 seconds delay. But the message is not send to the DLQ (at least, not the DLQ topic I'm listening). If I ask the topic list
curl --silent -XGET <http://localhost:8080/admin/v2/persistent/public/testns>
there is only 2 topics (I was expected 3 : main, retry, dlq) :
["<persistent://public/testns/test>","<persistent://public/testns/test-subs-DLQ>"]
. I tried also to not listen to test-subs-DLQ (removing one consumer in the code) and there is only 1 topic created (test). Any clue ?
a
Can you try setting the topic:
Copy code
DeadLetterPolicy deadLetterPolicy = DeadLetterPolicy.builder()
		                                                    .maxRedeliverCount(2)
		                                                    .retryLetterTopic("public/testns/test-subs-RETRY") ### Seems it is inside `public/testns/` and pulsar would create it in public default.
		                                                    .deadLetterTopic("public/testns/test-subs-DLQ") ## Same here
		                                                    .initialSubscriptionName("dlq-sub")
		                                                    .build();
g
Ok, I was thinking Pulsar creates RETRY en DLQ topic in the same tenant and namespace than the original topic. Works if I use full topic name. Thank you so much.