You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/08/28 09:22:49 UTC
[GitHub] [rocketmq-schema-registry] ferrirW opened a new pull request, #52: [ISSUE #48] Support different consumer group by ip
ferrirW opened a new pull request, #52:
URL: https://github.com/apache/rocketmq-schema-registry/pull/52
clode #48
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-schema-registry] MatrixHB commented on a diff in pull request #52: [ISSUE #48] Support different consumer group by ip
Posted by GitBox <gi...@apache.org>.
MatrixHB commented on code in PR #52:
URL: https://github.com/apache/rocketmq-schema-registry/pull/52#discussion_r956706951
##########
common/src/main/java/org/apache/rocketmq/schema/registry/common/utils/CommonUtil.java:
##########
@@ -247,4 +251,30 @@ public static long getSchemaRecordId(long schemaId, long schemaVersion) {
return schemaId | schemaVersion;
}
+ public static String getIp() {
+ String ip = "";
+
+ try {
+ Enumeration<NetworkInterface> netInterfaces = NetworkInterface.getNetworkInterfaces();
+ InetAddress inetAddress;
+ boolean found = false;
+ while (netInterfaces.hasMoreElements() && !found) {
Review Comment:
it seems that boolean found is always false
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-schema-registry] codecov-commenter commented on pull request #52: [ISSUE #48] Support different consumer group by ip
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #52:
URL: https://github.com/apache/rocketmq-schema-registry/pull/52#issuecomment-1231686795
# [Codecov](https://codecov.io/gh/apache/rocketmq-schema-registry/pull/52?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#52](https://codecov.io/gh/apache/rocketmq-schema-registry/pull/52?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b3144e0) into [main](https://codecov.io/gh/apache/rocketmq-schema-registry/commit/76924cdd6dc14456580a881a7669ff1ecf174077?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (76924cd) will **increase** coverage by `9.38%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## main #52 +/- ##
===========================================
+ Coverage 9.58% 18.97% +9.38%
- Complexity 25 56 +31
===========================================
Files 37 45 +8
Lines 772 896 +124
Branches 40 46 +6
===========================================
+ Hits 74 170 +96
- Misses 692 713 +21
- Partials 6 13 +7
```
| [Impacted Files](https://codecov.io/gh/apache/rocketmq-schema-registry/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ketmq/schema/registry/client/serde/Serializer.java](https://codecov.io/gh/apache/rocketmq-schema-registry/pull/52/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9zY2hlbWEvcmVnaXN0cnkvY2xpZW50L3NlcmRlL1NlcmlhbGl6ZXIuamF2YQ==) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
| [...ema/registry/client/serde/avro/AvroSerializer.java](https://codecov.io/gh/apache/rocketmq-schema-registry/pull/52/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9zY2hlbWEvcmVnaXN0cnkvY2xpZW50L3NlcmRlL2F2cm8vQXZyb1NlcmlhbGl6ZXIuamF2YQ==) | `70.96% <0.00%> (-1.76%)` | :arrow_down: |
| [...registry/client/config/AvroDeserializerConfig.java](https://codecov.io/gh/apache/rocketmq-schema-registry/pull/52/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9zY2hlbWEvcmVnaXN0cnkvY2xpZW50L2NvbmZpZy9BdnJvRGVzZXJpYWxpemVyQ29uZmlnLmphdmE=) | | |
| [...ry/client/serde/avro/ReflectionAvroSerializer.java](https://codecov.io/gh/apache/rocketmq-schema-registry/pull/52/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9zY2hlbWEvcmVnaXN0cnkvY2xpZW50L3NlcmRlL2F2cm8vUmVmbGVjdGlvbkF2cm9TZXJpYWxpemVyLmphdmE=) | `86.66% <0.00%> (ø)` | |
| [...ema/registry/client/serde/json/JsonSerializer.java](https://codecov.io/gh/apache/rocketmq-schema-registry/pull/52/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9zY2hlbWEvcmVnaXN0cnkvY2xpZW50L3NlcmRlL2pzb24vSnNvblNlcmlhbGl6ZXIuamF2YQ==) | `63.33% <0.00%> (ø)` | |
| [...a/registry/client/serde/json/JsonDeserializer.java](https://codecov.io/gh/apache/rocketmq-schema-registry/pull/52/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9zY2hlbWEvcmVnaXN0cnkvY2xpZW50L3NlcmRlL2pzb24vSnNvbkRlc2VyaWFsaXplci5qYXZh) | `65.62% <0.00%> (ø)` | |
| [...a/registry/client/config/JsonSerializerConfig.java](https://codecov.io/gh/apache/rocketmq-schema-registry/pull/52/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9zY2hlbWEvcmVnaXN0cnkvY2xpZW50L2NvbmZpZy9Kc29uU2VyaWFsaXplckNvbmZpZy5qYXZh) | `100.00% <0.00%> (ø)` | |
| [...egistry/client/serde/avro/ReflectionAvroSerde.java](https://codecov.io/gh/apache/rocketmq-schema-registry/pull/52/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9zY2hlbWEvcmVnaXN0cnkvY2xpZW50L3NlcmRlL2F2cm8vUmVmbGVjdGlvbkF2cm9TZXJkZS5qYXZh) | `100.00% <0.00%> (ø)` | |
| [...q/schema/registry/client/serde/json/JsonSerde.java](https://codecov.io/gh/apache/rocketmq-schema-registry/pull/52/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9zY2hlbWEvcmVnaXN0cnkvY2xpZW50L3NlcmRlL2pzb24vSnNvblNlcmRlLmphdmE=) | `100.00% <0.00%> (ø)` | |
| [.../client/serde/avro/ReflectionAvroDeserializer.java](https://codecov.io/gh/apache/rocketmq-schema-registry/pull/52/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9zY2hlbWEvcmVnaXN0cnkvY2xpZW50L3NlcmRlL2F2cm8vUmVmbGVjdGlvbkF2cm9EZXNlcmlhbGl6ZXIuamF2YQ==) | `70.58% <0.00%> (ø)` | |
| ... and [3 more](https://codecov.io/gh/apache/rocketmq-schema-registry/pull/52/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-schema-registry] MatrixHB commented on a diff in pull request #52: [ISSUE #48] Support different consumer group by ip
Posted by GitBox <gi...@apache.org>.
MatrixHB commented on code in PR #52:
URL: https://github.com/apache/rocketmq-schema-registry/pull/52#discussion_r956706460
##########
storage-rocketmq/src/main/java/org/apache/rocketmq/schema/registry/storage/rocketmq/RocketmqClient.java:
##########
@@ -203,39 +200,28 @@ public void startRemoteStorage() {
try {
producer.start();
- scheduleConsumer.setPullThreadNums(4);
+ scheduleConsumer.subscribe(storageTopic, "*");
+ scheduleConsumer.registerMessageListener(new MessageListener());
scheduleConsumer.start();
-
- Collection<MessageQueue> messageQueueList = scheduleConsumer.fetchMessageQueues(storageTopic);
- scheduleConsumer.assign(messageQueueList);
- messageQueueList.forEach(mq -> {
- try {
- scheduleConsumer.seekToBegin(mq);
- } catch (MQClientException e) {
- e.printStackTrace();
- }
- });
- this.scheduledExecutorService.scheduleAtFixedRate(new RocketmqStoragePullTask(),
- 0, PULL_TASK_INTERVAL, TimeUnit.MILLISECONDS);
-
} catch (MQClientException e) {
throw new SchemaException("Rocketmq client start failed", e);
}
}
- public class RocketmqStoragePullTask implements Runnable {
+ public class MessageListener implements MessageListenerConcurrently {
Review Comment:
It's better to use MessageListenerOrderly instead of MessageListenerConcurrently
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-schema-registry] ni-ze merged pull request #52: [ISSUE #48] Support different consumer group by ip
Posted by GitBox <gi...@apache.org>.
ni-ze merged PR #52:
URL: https://github.com/apache/rocketmq-schema-registry/pull/52
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org