Skip to content

HTTP/Webhook sink#68

Merged
vnvo merged 4 commits intomainfrom
http-sink
Apr 2, 2026
Merged

HTTP/Webhook sink#68
vnvo merged 4 commits intomainfrom
http-sink

Conversation

@vnvo
Copy link
Copy Markdown
Owner

@vnvo vnvo commented Apr 2, 2026

What

New HTTP/Webhook sink that delivers CDC events via HTTP POST/PUT to any URL.

  • URL templates for per-table routing (${source.table})
  • Custom headers with ${ENV_VAR} expansion (Bearer, Basic, API key)
  • Batch mode: JSON array in one request, or per-event requests
  • Retry on 5xx, 408, 429, connection errors, timeouts
  • Auth errors (401/403) fail immediately
  • DLQ-eligible routing errors (URL template failures)
  • Connection pooling via reqwest

Why

Universal integration point - any system can consume HTTP. No Kafka/NATS/Redis required. Enables: internal services, serverless functions, third-party APIs, webhooks. Completes the "try DeltaForge in 5 minutes" story with zero infrastructure dependencies.

Testing

8 integration tests using local axum HTTP server (no Docker needed):

  • Single event delivery
  • Batch per-event (5 events -> 5 POST requests)
  • Batch mode array (5 events -> 1 POST with JSON array)
  • Auth error (401 -> SinkError::Auth, no retry, 1 request)
  • 5xx retries (500 -> multiple attempts)
  • URL template routing (${source.table} resolved)
  • Custom headers delivered to server
  • Connection refused -> retries, then Connect error

Checklist

  • Tests pass (cargo test)
  • Code formatted (cargo fmt)
  • Clippy clean
  • Docs: sink page, sinks README, SUMMARY, delivery tiers

vnvo added 4 commits April 3, 2026 01:28
Delivers CDC events via HTTP POST/PUT to any URL.

Features:
- URL templates for per-table routing (${source.table})
- Custom headers with ${ENV_VAR} expansion (Bearer, Basic, API key)
- Batch mode: JSON array in one request, or per-event requests
- Retry on 5xx, 408, 429, connection errors, timeouts
- Auth errors (401/403) fail immediately
- DLQ-eligible routing errors (URL template failures)
- Connection pooling via reqwest

Integration tests (8): single event, batch per-event, batch mode array,
auth error (no retry), 5xx retries, URL template routing, custom headers,
connection refused retries. All use local axum test server.
@vnvo vnvo merged commit d43b8f4 into main Apr 2, 2026
4 checks passed
@vnvo vnvo deleted the http-sink branch April 2, 2026 22:48
@vnvo vnvo mentioned this pull request Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant