Skip to content

G-khan/grpc-sample-java-server-kotlin-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple Synchronous Communication Example with gRPC

Java Server and Kotlin Client Java Server and Kotlin Client

Requirements

  1. Java - 1.11.x
  2. Gradle- 3.x.x

Step 1: Running the Banking service as gRPC Server

Open the banking Service path then, Type the following commands in your terminal to run the banking service

./gradlew clean build
./gradlew run

Step 2: Running the Payment service as gRPC Client

Open the payment Service path then, Type the following commands in your terminal to run the payment service

./gradlew clean build
./gradlew run

Logs after run the applications:

Payment Service:

> Task :run
Mar 08, 2021 8:59:48 PM com.gokhana.payment.client.PaymentClient invokeGrpcSampleService
INFO: id: 1535502916
isSuccess: true
referenceId: 292592000
message: "Transaction 2384327497216806399 successfully completed with type Credit Card"

Banking Service:

Mar 08, 2021 8:59:48 PM com.gokhana.banking.service.BankingServiceImpl pay
INFO: gRPC request id: 1535502916
paymentType: "Credit Card"
bankId: 3233083119461668241
transactionId: 2384327497216806399
payDetail: "Hello from GRPC Client"

About

gRPC Sample for Java Server and Kotlin Client

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published