Skip to content

Add support for dead-letter topics in streaming subscriptions#1746

Open
siri-varma wants to merge 1 commit into
dapr:masterfrom
siri-varma:users/svegiraju/add-dlq
Open

Add support for dead-letter topics in streaming subscriptions#1746
siri-varma wants to merge 1 commit into
dapr:masterfrom
siri-varma:users/svegiraju/add-dlq

Conversation

@siri-varma
Copy link
Copy Markdown
Contributor

@siri-varma siri-varma commented May 18, 2026

Adds optional deadLetterTopic parameter to the streaming subscribe APIs on DaprPreviewClient / DaprClientImpl, wiring it through to the SubscribeTopicEventsRequestInitialAlpha1.dead_letter_topic proto field.

New overloads:

  • subscribeToEvents(pubsubName, topic, deadLetterTopic, listener, type)
  • subscribeToTopic(pubsubName, topic, deadLetterTopic, type)
  • subscribeToTopic(pubsubName, topic, deadLetterTopic, type, metadata)

Existing methods delegate to the new ones with a null deadLetterTopic, and the field is only set on the request when a non-empty value is provided. Adds unit tests covering both presence and absence of the field on the gRPC initial frame.

Fixes: #1608

Description

Please explain the changes you've made

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@siri-varma siri-varma marked this pull request as ready for review May 18, 2026 18:29
@siri-varma siri-varma requested review from a team as code owners May 18, 2026 18:29
@siri-varma siri-varma changed the title Add Dead Letter Queue Add support for dead-letter topics in streaming subscriptions May 18, 2026
…1608)

Adds optional deadLetterTopic parameter to the streaming subscribe APIs
on DaprPreviewClient / DaprClientImpl, wiring it through to the
SubscribeTopicEventsRequestInitialAlpha1.dead_letter_topic proto field.

New overloads:
- subscribeToEvents(pubsubName, topic, deadLetterTopic, listener, type)
- subscribeToTopic(pubsubName, topic, deadLetterTopic, type)
- subscribeToTopic(pubsubName, topic, deadLetterTopic, type, metadata)

Existing methods delegate to the new ones with a null deadLetterTopic,
and the field is only set on the request when a non-empty value is
provided. Adds unit tests covering both presence and absence of the
field on the gRPC initial frame.

Fixes: dapr#1608
Signed-off-by: Siri Varma Vegiraju <s_vegiraju@apple.com>
@siri-varma siri-varma force-pushed the users/svegiraju/add-dlq branch from 4e4dcc3 to 6313830 Compare May 18, 2026 18:41
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.76%. Comparing base (89708ae) to head (6313830).

Files with missing lines Patch % Lines
...k/src/main/java/io/dapr/client/DaprClientImpl.java 80.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1746      +/-   ##
============================================
- Coverage     76.77%   76.76%   -0.01%     
- Complexity     2259     2264       +5     
============================================
  Files           241      241              
  Lines          7066     7072       +6     
  Branches        740      742       +2     
============================================
+ Hits           5425     5429       +4     
  Misses         1277     1277              
- Partials        364      366       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@siri-varma siri-varma added this to the v1.18 milestone May 18, 2026
@siri-varma
Copy link
Copy Markdown
Contributor Author

@javier-aliaga @dapr/maintainers-java-sdk Read for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for dead-letter topics in streaming subscriptions

1 participant