Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rocketmq add util func #1082

Merged
merged 2 commits into from
Mar 28, 2024
Merged

Conversation

li-keli
Copy link
Contributor

@li-keli li-keli commented Mar 27, 2024

Describe what this PR does / why we need it

This pull request adds two new methods to the Producer struct in the RocketMQ package. The SendWithResult method allows sending messages with a custom tag and returns the send result. The SendMsg method is used for sending messages with a custom message format.

Does this pull request fix one issue?

NONE

Describe how you did it

I added two new methods to the Producer struct: SendWithResult and SendMsg. The SendWithResult method constructs a new message with a specified tag and sends it synchronously, returning the send result. The SendMsg method sends a custom message using the provided Message struct.

Describe how to verify it

To verify this change, you can follow these steps:

  1. Use the SendWithResult method with a custom message and tag to send a message and verify that it returns the send result.
  2. Use the SendMsg method with a custom Message struct to send a message and verify that it sends successfully.

Special notes for reviews

Please review the implementation of the SendWithResult and SendMsg methods for correctness and adherence to coding standards. Pay particular attention to error handling and logging in case of failures.

@sysulq sysulq changed the title Feat/rocketmq add func feat: rocketmq add util func Mar 27, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 52.99%. Comparing base (299b3ec) to head (71198c0).
Report is 2 commits behind head on master.

Files Patch % Lines
pkg/client/rocketmq/producer.go 0.00% 18 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1082      +/-   ##
==========================================
- Coverage   53.10%   52.99%   -0.12%     
==========================================
  Files         206      206              
  Lines       11535    11562      +27     
==========================================
+ Hits         6126     6127       +1     
- Misses       4941     4966      +25     
- Partials      468      469       +1     

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

@sysulq sysulq merged commit 0c8e413 into douyu:master Mar 28, 2024
11 of 12 checks passed
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.

None yet

3 participants