Skip to content

Commit

Permalink
docs: decision record about multiple protocol webhooks (#4747)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolf4ood authored Jan 22, 2025
1 parent 446ff65 commit 53c51be
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
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.
2 changes: 1 addition & 1 deletion docs/developer/decision-records/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@
- [2024-10-24 bidirectional-data-transfers](./2024-10-24-bidirectional-data-transfers)
- [2024-11-06 configuration-injection](./2024-11-06-configuration-injection)
- [2024-11-19 transformer-version-scheme](./2024-11-19-transformer-version-scheme)

- [2025-01-21 Multiple Protocol Webhooks](./2025-01-21-multipe-protocol-webhooks)

0 comments on commit 53c51be

Please sign in to comment.