You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -102,9 +103,7 @@ protocol mandates the following messages:
102
103
103
104
### Message stream
104
105
105
-
In order to execute a service method invocation, service deployment and restate Runtime open a single stream between the
106
-
runtime and the service deployment. Given 10 concurrent service method invocations to a service deployment, there are 10
107
-
concurrent streams, each of them mapping to a specific invocation.
106
+
In order to execute an invocation, service deployment and restate Runtime open a single stream between the runtime and the service deployment. Given 10 concurrent invocations to a service deployment, there are 10 concurrent streams, each of them mapping to a specific invocation.
108
107
109
108
Every unit of the stream contains a Message serialized using the
110
109
[Protobuf encoding](https://protobuf.dev/programming-guides/encoding/), using the definitions in
@@ -119,10 +118,23 @@ in two modes:
119
118
runtime. Once the service deployment starts sending messages to the runtime, the runtime cannot send messages anymore
120
119
back to the service deployment.
121
120
122
-
When opening the stream, the request method MUST be `POST` and the request path MUST have the following format:
121
+
A message stream MUST start with `StartMessage` and MUST end with either:
122
+
123
+
- One [`SuspensionMessage`](#suspension)
124
+
- One [`ErrorMessage`](#failures)
125
+
- One `EndMessage`
126
+
127
+
If the message stream does not end with any of these two messages, it will be considered equivalent to sending an
128
+
`ErrorMessage` with an [unknown failure](#failures).
129
+
130
+
The `EndMessage` marks the end of the invocation lifecycle, that is the end of the journal.
131
+
132
+
### Initiating the stream
133
+
134
+
When opening the stream, the HTTP request method MUST be `POST` and the request path MUST have the following format:
123
135
124
136
```
125
-
/invoke/{fullyQualifiedServiceName}/{methodName}
137
+
/invoke/{serviceName}/{handlerName}
126
138
```
127
139
128
140
For example:
@@ -133,19 +145,29 @@ For example:
133
145
134
146
An arbitrary path MAY prepend the aforementioned path format.
135
147
136
-
In case the path format is not respected, or `fullyQualifiedServiceName` or `methodName` is unknown, the SDK MUST close
137
-
the stream replying back with a `404` status code.
148
+
In case the path format is not respected, or `serviceName` or `handlerName` is unknown, the SDK MUST close the stream replying back with a `404` status code.
138
149
139
-
A message stream MUST start with `StartMessage` and MUST end with either:
150
+
In case the invocation is accepted, `200` status code MUST be returned.
140
151
141
-
- One [`SuspensionMessage`](#suspension)
142
-
- One [`ErrorMessage`](#failures)
143
-
- One `EndMessage`
152
+
Additionally, the header `x-restate-user-agent` MAY be sent back, with the following format:
144
153
145
-
If the message stream does not end with any of these two messages, it will be considered equivalent to sending an
146
-
`ErrorMessage` with an [unknown failure](#failures).
0 commit comments