[ 
https://issues.apache.org/jira/browse/SCB-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16310624#comment-16310624
 ] 

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_r159568168
 
 

 ##########
 File path: 
omega/omega-connector/omega-connector-grpc/src/main/java/org/apache/servicecomb/saga/omega/connector/grpc/GrpcCompensateStreamObserver.java
 ##########
 @@ -0,0 +1,62 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ */
+
+package org.apache.servicecomb.saga.omega.connector.grpc;
+
+import java.lang.invoke.MethodHandles;
+
+import org.apache.servicecomb.saga.omega.transaction.MessageHandler;
+import org.apache.servicecomb.saga.pack.contract.grpc.GrpcCompensateCommand;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import io.grpc.stub.StreamObserver;
+
+public class GrpcCompensateStreamObserver implements 
StreamObserver<GrpcCompensateCommand> {
+
+  private static final Logger LOG = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+  private final MessageHandler messageHandler;
+
+  public GrpcCompensateStreamObserver(MessageHandler messageHandler) {
+    this.messageHandler = messageHandler;
+  }
+
+  @Override
+  public void onNext(GrpcCompensateCommand command) {
+    LOG.info("receive compensate command, global tx id: {}, local tx id: {}, 
compensate method: {}",
 
 Review comment:
   `receive` -> `Received`

----------------------------------------------------------------
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)

Reply via email to