-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
125 lines (71 loc) · 3.77 KB
/
notes.txt
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Bind POST restQ/bind/<queueName>
reply: { flowId }
Unbind DELETE restQ/unbind/<queueNaem>?flowId=blahblhlabhahblhalb
Consume Msg GET restQ/con/<flowId>
reply: { msg, msgId }
Ack message DELETE restQ/ack/<msgId>
setStringProperty("JMS_Solace_HTTP_method", "GET")
setStringProperty("JMS_Solace_HTTP_target_path_query_verbatim", "some/path&query=val").
^^^^^^^^^^^^^^^^^^ Start Message ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Destination: Topic 'POST/restQ/bind/q2'
AppMessageID: ID:Solace-f36ecc285557d3e8
CorrelationId: ID:Solace-f36ecc285557d3e8
Class Of Service: USER_COS_1
DeliveryMode: DIRECT
Message Id: 16
ReplyTo: Topic '#P2P/v:aaron-router/_rest-9927675e3aeca6a0/POST/restQ/bind/q2'
TimeToLive: 30000
User Property Map: 4 entries
Key 'JMS_Solace_HTTP_field_Accept' (String): */*
Key 'JMS_Solace_HTTP_field_User-Agent' (String): curl/7.68.0
Key 'JMS_Solace_HTTP_method' (String): POST
Key 'JMS_Solace_HTTP_target_path_query_verbatim' (String): restQ/bind/q2
^^^^^^^^^^^^^^^^^^ End Message ^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^ Start Message ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Destination: Topic 'restQ/unbind/q3'
AppMessageID: ID:Solace-1913fbbb008f3c71
CorrelationId: ID:Solace-1913fbbb008f3c71
Class Of Service: USER_COS_1
DeliveryMode: DIRECT
Message Id: 14
ReplyTo: Topic '#P2P/v:aaron-router/_rest-e84b5448e80a2ae9/restQ/unbind/q3'
^^^^^^^^^^^^^^^^^^ End Message ^^^^^^^^^^^^^^^^^^^^^^^^^^^
in messaigng mode, with http://lcoalhost:9000/POST/restQ/....
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
REQUEST MESSAGE:
Destination: Topic 'POST/restQ/unbind/q3'
AppMessageID: ID:Solace-d463c5976cdbca7e
CorrelationId: ID:Solace-d463c5976cdbca7e
Class Of Service: USER_COS_1
DeliveryMode: DIRECT
Message Id: 13
ReplyTo: Topic '#P2P/v:aaron-router/_rest-11b11ea0b59ca015/POST/restQ/unbind/q3'
HTTP Content Type: application/json
Binary Attachment: len=23
1f 00 00 00 17 7b 20 22 61 66 64 73 22 3a 22 61 .....{."afds":"a
64 73 66 22 20 7d 00 dsf".}.
watch strigo training video
# RestQ Notes
```
Map queueToFlowId: queueName -> flowId
//Map queueToFlow: queueName -> flow
Map flowIdToFlow: flowId -> flow
Map flowIdToQueue: flowId -> queueName
```
## Bind: POST /restQ/bind/q1
- check if queueToFlowId.containsKey(queueName); // make sure this queue doesn't have bound flow
- if YES: return error, include flowId, and magicKey (needed to close flow)
- if NO: bind to queue, add sub to /restQ/*/$flowId return result
## Timeout:
- close() FlowReceiver
- leave all maps as is
## Receive: GET /restQ/recv/$flowId?format=$format
$flowId = UUID
$format = [pretty|dump] optional
- check if flowIdToFlow.containsKey(flowId); // make sure this flow exists
- if YES: attempt to receive message
- if SUCCESS: return 200OK + $msgId + actual message
- if NO_MSG: return 200OK + no-message
- if FAIL: probably due to closed closedFlow or disconnection: return error code status
## Ack Message: DELETE /restQ/ack/$flowId?msgId=$msgid
## Unbind Queue / Close Flow: DELETE /restQ/unbind/$flowId?magicKey=$magicKey