Skip to content

Refactor DLQ with new JS API#51

Merged
rossnelson merged 3 commits intomainfrom
dlq-new-js-api
Mar 3, 2025
Merged

Refactor DLQ with new JS API#51
rossnelson merged 3 commits intomainfrom
dlq-new-js-api

Conversation

@rossnelson
Copy link
Member

  • Add Nats JS Connection Manager
  • remove old natsjs package
  • new jetstream api
  • feat: add Connector interface to natsjscm
  • test: refactor natsjsdlq tests with new js api

@codecov
Copy link

codecov bot commented Mar 3, 2025

Codecov Report

Attention: Patch coverage is 11.38211% with 109 lines in your changes missing coverage. Please review.

Project coverage is 50.12%. Comparing base (9a5634b) to head (bfa86e1).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
messaging/natsjspub/natsjspub.go 0.00% 107 Missing ⚠️
messaging/natsjsdlq/natsjsdlq.go 87.50% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
- Coverage   51.16%   50.12%   -1.05%     
==========================================
  Files         125      126       +1     
  Lines        4874     4986     +112     
==========================================
+ Hits         2494     2499       +5     
- Misses       2242     2349     +107     
  Partials      138      138              

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

@rossnelson rossnelson changed the title dlq new js api Refactor DLQ with new JS API Mar 3, 2025
Refactored the natsjsdlq tests to use new mock implementations for
ConnectionManager and Publisher. Added test cases for validating
configuration, checking DLQ conditions, and publishing messages to DLQ.
Ensured proper context handling and error checking in tests.
Introduced a new PublishManager in the natsjspub package to handle
publishing messages to JetStream. This includes methods for publishing
messages, publishing JSON-serializable objects, and ensuring streams
exist. Added support for circuit breakers and configurable timeouts.
@rossnelson rossnelson merged commit f9856c5 into main Mar 3, 2025
1 check passed
@rossnelson rossnelson deleted the dlq-new-js-api branch March 3, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant