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 #4643]Fix Grpc client can't reconnection when runtime after crashing the runtime and restarting it #4644

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Delete unnecessary code
  • Loading branch information
mxsm committed Dec 14, 2023
commit 05329919f25227d9aae8515506a38d3ee1d8df8d
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
}

public void init() {
this.channel = ManagedChannelBuilder.forAddress(clientConfig.getServerAddr(), clientConfig.getServerPort()).enableRetry().usePlaintext()
this.channel = ManagedChannelBuilder.forAddress(clientConfig.getServerAddr(), clientConfig.getServerPort()).usePlaintext()
.build();
this.consumerClient = ConsumerServiceGrpc.newBlockingStub(channel);
this.consumerAsyncClient = ConsumerServiceGrpc.newStub(channel);
Expand Down Expand Up @@ -247,8 +247,8 @@
return;
}

final Map<String, List<SubscriptionItem>> subscriptionGroup = subscriptionMap.values().stream()
.collect(Collectors.groupingBy(SubscriptionInfo::getUrl, mapping(SubscriptionInfo::getSubscriptionItem, toList())));

Check warning on line 251 in eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/consumer/EventMeshGrpcConsumer.java

View check run for this annotation

Codecov / codecov/patch

eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/consumer/EventMeshGrpcConsumer.java#L250-L251

Added lines #L250 - L251 were not covered by tests

subscriptionGroup.forEach((url, items) -> {
CloudEvent subscription = EventMeshCloudEventBuilder.buildEventSubscription(clientConfig, EventMeshProtocolType.EVENT_MESH_MESSAGE, url,
Expand Down
Loading