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

[Issue #523] Adding Flow control RateLimiter support in Http Message Send Processor #524

Merged
merged 22 commits into from
Sep 27, 2021

Conversation

jinrongluo
Copy link
Contributor

Issue #523 Adding Flow control RateLimiter support in Http Message Send Processor

Motivation

In Eventmesh runtime, there is flow control using RateLimiter in TCP MessageTransfer processor, and HTTP Batch Message send processor. However flow control is missing in Http MessageSend (Sync & Async) procrssors.

I have implemented RateLimiter for Http Message Send processors, and would like to contribute.

Modifications

Adding RateLimiter to Http Message Send Processor.

Using property file to set the rate limit

@jinrongluo jinrongluo changed the title Issue#523 Adding Flow control RateLimiter support in Http Message Send Processor [Issue #523] Adding Flow control RateLimiter support in Http Message Send Processor Sep 17, 2021
@@ -39,7 +39,8 @@
EVENTMESH_SUBSCRIBE_ERR(17, "eventMesh subscribe err"),
EVENTMESH_UNSUBSCRIBE_ERR(18, "eventMesh unsubscribe err"),
EVENTMESH_HEARTBEAT_ERR(19, "eventMesh heartbeat err"),
EVENTMESH_ACL_ERR(20, "eventMesh acl err");
EVENTMESH_ACL_ERR(20, "eventMesh acl err"),
EVENTMESH_HTTP_MES_SEND_OVER_LIMIT_ERR(20, "eventMesh http msg send over the limit, ");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code 20 isn't right

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @xwm1992 I fix the error code to make it as 21.

Adding new commit to this PR

@codecov-commenter
Copy link

Codecov Report

Merging #524 (052aa93) into develop (9c1d21f) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #524      +/-   ##
=============================================
- Coverage      11.03%   10.99%   -0.04%     
  Complexity       376      376              
=============================================
  Files            257      257              
  Lines          12157    12191      +34     
  Branches        1032     1036       +4     
=============================================
  Hits            1341     1341              
- Misses         10701    10735      +34     
  Partials         115      115              
Impacted Files Coverage Δ
.../common/protocol/http/common/EventMeshRetCode.java 0.00% <0.00%> (ø)
...he/eventmesh/runtime/boot/EventMeshHTTPServer.java 0.00% <0.00%> (ø)
...time/configuration/EventMeshHTTPConfiguration.java 0.00% <0.00%> (ø)
...ocol/http/processor/BatchSendMessageProcessor.java 0.00% <0.00%> (ø)
...ol/http/processor/BatchSendMessageV2Processor.java 0.00% <0.00%> (ø)
...protocol/http/processor/ReplyMessageProcessor.java 0.00% <0.00%> (ø)
...ocol/http/processor/SendAsyncMessageProcessor.java 0.00% <0.00%> (ø)
...tocol/http/processor/SendSyncMessageProcessor.java 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c1d21f...052aa93. Read the comment docs.

@xwm1992 xwm1992 merged commit 546765e into apache:develop Sep 27, 2021
@jinrongluo jinrongluo deleted the develop-ratelimit branch September 27, 2021 14:42
xwm1992 pushed a commit to xwm1992/EventMesh that referenced this pull request Dec 27, 2021
…ssage Send Processor (apache#524)

* [Issue apache#337] Fix HttpSubscriber startup issue

* [Issue apache#337] test commit

* [Issue apache#337] revert test commit

* [Issue apache#337] Enhance Http Demo Subscriber by using ExecutorService, CountDownLatch and PreDestroy hook

* [Issue apache#337] Enhance Http Demo Subscriber by using ExecutorService, CountDownLatch and PreDestroy hook

* [Issue apache#337] Address code review comment for Subscriber Demo App

* Issue apache#523 adding FlowControl Ratelimiter support for Http message send processors

* [Issue apache#523] Fixing the Eventmesh ratelimit error return code.

Co-authored-by: j00441484 <jin.rong.luo@huawei.com>
xwm1992 pushed a commit that referenced this pull request Aug 4, 2022
…Send Processor (#524)

* [Issue #337] Fix HttpSubscriber startup issue

* [Issue #337] test commit

* [Issue #337] revert test commit

* [Issue #337] Enhance Http Demo Subscriber by using ExecutorService, CountDownLatch and PreDestroy hook

* [Issue #337] Enhance Http Demo Subscriber by using ExecutorService, CountDownLatch and PreDestroy hook

* [Issue #337] Address code review comment for Subscriber Demo App

* Issue #523 adding FlowControl Ratelimiter support for Http message send processors

* [Issue #523] Fixing the Eventmesh ratelimit error return code.

Co-authored-by: j00441484 <jin.rong.luo@huawei.com>
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.

3 participants