[ https://issues.apache.org/jira/browse/SCB-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16310623#comment-16310623 ]
ASF GitHub Bot commented on SCB-138: ------------------------------------ seanyinx commented on a change in pull request #98: SCB-138 use grpc bidirectional streaming to connect alpha and omega URL: https://github.com/apache/incubator-servicecomb-saga/pull/98#discussion_r159568215 ########## File path: omega/omega-connector/omega-connector-grpc/src/main/java/org/apache/servicecomb/saga/omega/connector/grpc/GrpcClientMessageSender.java ########## @@ -20,36 +20,41 @@ package org.apache.servicecomb.saga.omega.connector.grpc; -import org.apache.servicecomb.saga.omega.transaction.TxEvent; - -import com.google.protobuf.ByteString; - -import io.grpc.ManagedChannel; import org.apache.servicecomb.saga.omega.context.ServiceConfig; +import org.apache.servicecomb.saga.omega.transaction.MessageHandler; import org.apache.servicecomb.saga.omega.transaction.MessageSender; import org.apache.servicecomb.saga.omega.transaction.MessageSerializer; - +import org.apache.servicecomb.saga.omega.transaction.TxEvent; import org.apache.servicecomb.saga.pack.contract.grpc.GrpcTxEvent; import org.apache.servicecomb.saga.pack.contract.grpc.GrpcTxEvent.Builder; import org.apache.servicecomb.saga.pack.contract.grpc.TxEventServiceGrpc; -import org.apache.servicecomb.saga.pack.contract.grpc.TxEventServiceGrpc.TxEventServiceBlockingStub; +import org.apache.servicecomb.saga.pack.contract.grpc.TxEventServiceGrpc.TxEventServiceStub; + +import com.google.protobuf.ByteString; + +import io.grpc.ManagedChannel; +import io.grpc.stub.StreamObserver; public class GrpcClientMessageSender implements MessageSender { - private final TxEventServiceBlockingStub eventService; + private final TxEventServiceStub eventService; private final MessageSerializer serializer; private final ServiceConfig serviceConfig; - public GrpcClientMessageSender(ManagedChannel eventService, MessageSerializer serializer, ServiceConfig serviceConfig) { - this.eventService = TxEventServiceGrpc.newBlockingStub(eventService); + private StreamObserver<GrpcTxEvent> requestObserver; Review comment: final please ---------------------------------------------------------------- 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: us...@infra.apache.org > [pack] omega's callback about transaction state > ----------------------------------------------- > > Key: SCB-138 > URL: https://issues.apache.org/jira/browse/SCB-138 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Saga > Reporter: Eric Lee > Assignee: Eric Lee > Fix For: java-chassis-1.0.0-m1 > > Original Estimate: 24h > Remaining Estimate: 24h > > as a dev, i want to register callback function in the server side, so the > server can send messages back to the client directly instead of establishing > a new connection to the exact client with its corresponding uri. -- This message was sent by Atlassian JIRA (v6.4.14#64029)