-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(platform): let the message/intent replier control the lifecycle …
…of the requestor’s Observable In request-response communication, by default, the requestor’s Observable never completes. However, the replier can include a response status code in the reply’s headers, allowing to control the lifecycle of the requestor’s Observable. For example, the status code `250` allows completing the requestor’s Observable after emitted the reply, or the status code `500` to error the Observable. - `250 (ResponseStatusCodes.TERMINAL)`: In request-reply communication, setting this status code will complete the requestor’s Observable after emitted the reply. - `500 (ResponseStatusCodes.ERROR)`: In request-reply communication, setting this status code will error the requestor’s Observable. See the enum `ResponseStatusCodes` for available status codes. See https://scion-microfrontend-platform-developer-guide.now.sh/#chapter:topic-based-messaging:request-response-message-exchange-pattern for an example. > Note that the platform evaluates status codes only in request-response communication. They are ignored when observing topics or intents in pub/sub communication but can still be used; however, they must be handled by the application, e.g., by using the `throwOnErrorStatus` SCION RxJS operator. BREAKING CHANGE: Enabling the message/intent replier to control the requestor’s Observable lifecycle introduced a breaking change in the host/client communication protocol. The messaging protocol between host and client HAS CHANGED for registering/unregistering capabilities/intentions using the `ManifestService`. Therefore, you must update the host and affected clients to the new version together. The API has not changed; the breaking change only applies to the `@scion/microfrontend-platform` version. To migrate: - Upgrade host and clients (which use the `ManifestService`) to `@scion/[email protected]`. - Remove the `throwOnErrorStatus` SCION RxJS operator when using `IntentClient#request$` or `MessageClient#request$` as already installed by the platform.
- Loading branch information
1 parent
4af9433
commit 77a4dd9
Showing
11 changed files
with
521 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.