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
To correctly handle initial request and make values easily available to stream consumers.
Proposed Solution
Once support for unbounded Event Stream payloads (RPC) is completed, initial-request can be supported by parsing initial request members (members in the request w/o @streaming trait) within the HttpMiddleware. In order to ensure that initail-request members are processed first by the intended service, these values should be added to a message with event-type 'initial-request' and pre-pended to the event stream before it is sent (as was done by the Kotlin SDK here).
Other Information
Implementing support for initial-request in RPC protocol-based event streams will first require adding support for unbounded event stream payloads (RPC). Currently, Event Streams (in request) in the Swift SDK are only supported over REST protocols where they are bound with @httpPayload.
Acknowledgements
I may be able to implement this feature request
This feature might incur a breaking change
The text was updated successfully, but these errors were encountered:
sichanyoo
changed the title
[Implementation] (Event Streams) Support initial-request in RPC-based protocols
feat: Add support for event stream initial-request to RPC-based protocols
Mar 1, 2024
Describe the feature
Initial messages are defined in the Smithy spec here: https://smithy.io/2.0/spec/streaming.html#initial-messages
Determine how initial request should be handled for RPC protocols and implement.
Depends on #1175
Use Case
To correctly handle initial request and make values easily available to stream consumers.
Proposed Solution
Once support for unbounded Event Stream payloads (RPC) is completed, initial-request can be supported by parsing initial request members (members in the request w/o @streaming trait) within the HttpMiddleware. In order to ensure that initail-request members are processed first by the intended service, these values should be added to a message with event-type 'initial-request' and pre-pended to the event stream before it is sent (as was done by the Kotlin SDK here).
Other Information
Implementing support for initial-request in RPC protocol-based event streams will first require adding support for unbounded event stream payloads (RPC). Currently, Event Streams (in request) in the Swift SDK are only supported over REST protocols where they are bound with @httpPayload.
Acknowledgements
The text was updated successfully, but these errors were encountered: