Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peti2001/test-micro-call
An example of a situation when RPC is not processed as expected
https://github.com/peti2001/test-micro-call
Last synced: 3 days ago
JSON representation
An example of a situation when RPC is not processed as expected
- Host: GitHub
- URL: https://github.com/peti2001/test-micro-call
- Owner: peti2001
- Created: 2020-02-10T21:19:22.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-10T22:21:32.000Z (almost 5 years ago)
- Last Synced: 2023-04-04T17:48:01.935Z (over 1 year ago)
- Language: Go
- Size: 48.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
An example of a situation when RPC is not processed as expected
# How to run?
It requires Go modules.```
git clone [email protected]:peti2001/test-micro-call.git
cd test-micro-call
cd serviceA
go run main.go
```
in another terminal start ServiceB
```
cd test-micro-call
cd serviceB
go run main.go
```# Output
ServiceA
```
2020-02-10 22:21:21.265350 I | Transport [http] Listening on [::]:65409
2020-02-10 22:21:21.265437 I | Broker [http] Connected to [::]:65410
2020-02-10 22:21:21.265730 I | Registry [mdns] Registering node: serviceA-f32ac091-6d90-48e9-b3c6-0d414275ced3
2020-02-10 22:21:21.269132 I | Subscribing serviceA-f32ac091-6d90-48e9-b3c6-0d414275ced3 to topic: sayHello.topic
2020-02-10 22:21:23.417395 I | Consume message. MessageId: 1021023610000
2020-02-10 22:21:23.417415 I | Hello, Peter
DEBUG ctx &context.valueCtx{Context:(*context.emptyCtx)(0xc0000420b8), key:metadata.metaKey{}, val:metadata.Metadata{"Content-Type":"application/protobuf", "Micro-From-Service":"serviceB", "Micro-Id":"f55d1c0c-73a0-48d4-823d-9f31b6eccd3d", "Micro-Topic":"sayHello.topic"}}
2020-02-10 22:21:25.524018 I | Ack is sent to ServiceB. Status:
2020-02-10 22:21:25.525139 I | Ack is sent to ServiceB with new context. Status: ok
```
ServiceB
```
2020-02-10 22:21:21.308042 I | Transport [http] Listening on [::]:65413
2020-02-10 22:21:21.308150 I | Broker [http] Connected to [::]:65414
2020-02-10 22:21:21.308417 I | Registry [mdns] Registering node: serviceB-b58169f2-5afd-4f82-aa68-87a68a48c1d2
2020-02-10 22:21:23.415727 I | Ask ServiceA to do a long process by publishing a message. Waiting for ack so I can continue after that. MessageId: 1021023610000
2020-02-10 22:21:25.524491 I | Ack recieved of messageId 1021023610000
```