-
-
Notifications
You must be signed in to change notification settings - Fork 280
/
rpc-client-asyncapi.yml
72 lines (72 loc) · 1.53 KB
/
rpc-client-asyncapi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
asyncapi: 3.0.0
id: 'urn:example:rpcclient'
info:
title: RPC Client Example
version: 1.0.0
description: This example demonstrates how to define an RPC client.
defaultContentType: application/json
servers:
production:
host: rabbitmq.example.org
protocol: amqp
channels:
queue:
address: '{queue}'
messages:
receiveSumResult:
correlationId:
location: $message.header#/correlation_id
payload:
type: object
properties:
result:
type: number
examples:
- 7
parameters:
queue: {}
bindings:
amqp:
is: queue
queue:
exclusive: true
rpc_queue:
address: rpc_queue
messages:
requestSum:
correlationId:
location: $message.header#/correlation_id
payload:
type: object
properties:
numbers:
type: array
items:
type: number
examples:
- - 4
- 3
bindings:
amqp:
is: queue
queue:
durable: false
operations:
receiveSumResult:
action: receive
channel:
$ref: '#/channels/queue'
bindings:
amqp:
ack: false
messages:
- $ref: '#/channels/queue/messages/receiveSumResult'
requestSum:
action: send
channel:
$ref: '#/channels/rpc_queue'
bindings:
amqp:
ack: true
messages:
- $ref: '#/channels/rpc_queue/messages/requestSum'