-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: decision record about multiple protocol webhooks (#4747)
- Loading branch information
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
docs/developer/decision-records/2025-01-21-multipe-protocol-webhooks/README.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Multiple Protocol Webhooks | ||
|
||
## Decision | ||
|
||
We will add capabilities of registering multiple `ProtocolWebhook` for driving the selection | ||
of the `callbackAddress` based on the chosen protocol. | ||
|
||
## Rationale | ||
|
||
Currently, the `ProtocolWebhook` is a single injectable that is used to determine the `callbackAddress` | ||
to use for a remote protocol request. This is a limitation in cases where multiple protocols or | ||
multiple versions of the same protocol are supported. | ||
|
||
## Approach | ||
|
||
We will introduce a registry for `ProtocolWebhook`s: | ||
|
||
```java | ||
public interface ProtocolWebhookRegistry { | ||
|
||
void registerWebhook(String protocol, ProtocolWebhook webhook); | ||
|
||
ProtocolWebhook resolve(String protocol); | ||
} | ||
``` | ||
|
||
where each protocol or each protocol version can register its own `ProtocolWebhook`. | ||
|
||
The `ProtocolWebhookRegistry` will be injected in replacement of the single `ProtocolWebhook` and | ||
it will be resolved at runtime based on the user provided protocol. | ||
|
||
For the current DSP implementation we will register a `ProtocolWebhook` for each | ||
DSP protocol version supported. | ||
|
||
### Changes to the Catalog | ||
|
||
Currently, the `ProtocolWebhook` is also used to configure the `endpointUrl` of the `DataService` | ||
registered for the connector. Since we might have multiple `ProtocolWebhook` registered, we will | ||
change the registration and resolution of `DataService`s based on the input protocol. |
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