-
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.
GH-9743: Add observation to the
SourcePollingChannelAdapter
Fixes: #9743 Spring Integration provides observation for the `MessageChannel`, `MessageHandler` and `MessageProducerSupport`. The `SourcePollingChannelAdapter` is missing, and it is that only special endpoint which deals with `MessageSource` implementations via scheduled tasks in the poller. Essentially, this endpoint is a start of the flow, but it still is a consumer of data from the source system. * Add an `Observation` logic to the `SourcePollingChannelAdapter`. * Divide it into two phases: start (and open scope) when message is received; stop (and close scope) when the whole polling task for a message is done. We need this separation because of transaction scope for the polling task. At the same time we don't want to emit an observation for a void polling task. * Change `MessageReceiverContext` to accept a `handlerType`. The `MessageHandler` contributes a `handler`. The new support in the `SourcePollingChannelAdapter` - `message-source`. And change `MessageProducerSupport` to contribute a `message-producer` * Verify the single trace is supported for the whole flow (including transaction synchronization) starting from a `SourcePollingChannelAdapter` in a new `SourcePollingChannelAdapterObservationTests` * Document this new feature
- Loading branch information
1 parent
177bda5
commit 89c5dfa
Showing
8 changed files
with
295 additions
and
39 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
Oops, something went wrong.