Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain handling of null keys and values (tombstones) #462

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,60 @@ event without offloading information:
> If offloading matches a key with an empty object `{}` or array `[]`, these values are considered a match and will be
> offloaded just as any other matched value.

### Records with `null` Keys and Tombstone Handling

Records with `null` keys are processed and included in the EventBridge event detail structure. The `null` key is
preserved in the event, allowing downstream processors to know the original record had no key.

Records with `null` values (*tombstones*) are processed and included in the EventBridge event detail structure. The
`null` value is preserved, allowing downstream EventBridge rules and targets to handle tombstone records according to
their requirements. This is particularly useful for:
- Change Data Capture (CDC) scenarios where tombstones indicate record deletions
- Applications that need to track when values are explicitly set to `null`

Example EventBridge event structure for `null` keys and tombstone records:

```json
{
// snip ...
"detail": {
"topic": "json-values-topic",
"partition": 0,
"offset": 0,
"timestamp": 1684841916831,
"timestampType": "CreateTime",
"headers": [],
"key": null, // null key example
"value": null // tombstone record example
}
}
```

#### Example EventBridge Rule Filtering Patterns

Only match events where both, `key` and `value` are `null`:

```json
{
"detail": {
"topic": ["json-values-topic"],
"key": [null],
"value": [null]
}
}
````

Ignore tombstone events:

```json
{
"detail": {
"value": [{"anything-but": null}]
}
}

```

### Retry Behavior

By default, the connector is configured to retry failed [`PutEvents`
Expand Down