[
https://issues.apache.org/jira/browse/SCB-849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16583278#comment-16583278
]
ASF GitHub Bot commented on SCB-849:
------------------------------------
wujimin commented on a change in pull request #876: [SCB-849] refactor producer
connection limit using vertx metrics spi mechanism
URL:
https://github.com/apache/incubator-servicecomb-java-chassis/pull/876#discussion_r210790616
##########
File path:
foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/server/TcpServer.java
##########
@@ -67,19 +61,16 @@ public void init(Vertx vertx, String sslKey,
AsyncResultCallback<InetSocketAddre
}
netServer.connectHandler(netSocket -> {
- int connectedCount = connectedCounter.incrementAndGet();
+ int connectedCount = ((SCBDummyTCPMetrics) ((NetSocketImpl)
netSocket).metrics()).getConnectedCounter().get();
Review comment:
that depend on your logic, the object is your return value of
metrics.connected
io.vertx.core.http.impl.ClientHandler#handlerAdded
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> refactor producer connection limit using vertx metrics spi mechanism
> --------------------------------------------------------------------
>
> Key: SCB-849
> URL: https://issues.apache.org/jira/browse/SCB-849
> Project: Apache ServiceComb
> Issue Type: Bug
> Components: Java-Chassis
> Affects Versions: java-chassis-1.1.0
> Reporter: yangyongzheng
> Assignee: yangyongzheng
> Priority: Major
> Fix For: java-chassis-1.1.0
>
>
> we can use vertx metrics spi mechanism to simplify connection limit feature
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)