-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
toReactivePublisher(autoStartOnSubscribe)
(#3657)
* Add `toReactivePublisher(autoStartOnSubscribe)` The `IntegrationFlowBuilder.toReactivePublisher()` returns a `Publisher<Message<?>>` which may be subscribed somewhere late in the application logic, e.g. when WebSocket (or RSocket) subscription is initiated by the external client. In between application context startup and that subscription moment, the `IntegrationFlow` must not try to produce messages since there is nothing to consumer them from the `Publisher<Message<?>>` side. One of the way is to have a source endpoint not started automatically and control its lifecycle from the point fo reactive subscription * Introduce an `IntegrationFlowBuilder.toReactivePublisher(boolean autoStartOnSubscribe)` to let the framework do a job for an `IntegrationFlow` lifecycle control. This way end-user doesn't need to know autowire a starting endpoint and use `doOnSubscribe()` and similar callbacks * Change `ConsumerEndpointFactoryBean` log message about a `FixedSubscriberChannel` to `INFO` since an `autoStartup = false` really does not have any effect and there is nothing for end-user to worry about. The `IntegrationFlow` knows nothing about each endpoint internals and cannot control which mark as `autoStartup = false` and which not * Fix languge in JavaDocs Co-authored-by: Gary Russell <grussell@vmware.com> Co-authored-by: Gary Russell <grussell@vmware.com>
- Loading branch information
1 parent
fc7d338
commit eb4d583
Showing
6 changed files
with
60 additions
and
13 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