Skip to main content

HTTP Source

The http source opens an HTTP endpoint that accepts POST requests. External systems push events directly to LiteJoin — no polling required.

Configuration

sources:
  - type: http
    name: http-ingest
    topics: []   # Empty means accept any topic
    config:
      addr: ":8080"
FieldTypeDefaultDescription
addrstringrequiredAddress to listen on (e.g., :8080, 0.0.0.0:8080).
topicsstring[][]If set, only accept messages for these topics. Empty = accept all.

Sending Events

Send a JSON message to the HTTP endpoint:
curl -X POST http://localhost:8080/ingest \
  -H "Content-Type: application/json" \
  -d '{
    "topic": "orders",
    "key": "order_123",
    "payload": "{\"amount\": 45.00, \"user_id\": \"u_456\"}"
  }'

Request Format

FieldTypeRequiredDescription
topicstringyesTarget topic name
keystringyesUnique key for the message
payloadstring (JSON)yesJSON payload as a string

Batch Ingestion

Send multiple messages in a single request:
curl -X POST http://localhost:8080/ingest \
  -H "Content-Type: application/json" \
  -d '[
    {"topic": "orders", "key": "order_123", "payload": "{\"amount\": 45.00}"},
    {"topic": "orders", "key": "order_124", "payload": "{\"amount\": 12.50}"}
  ]'

When to Use

Use the HTTP source when:
  • Your application can push events directly (webhooks, event hooks)
  • You want low-latency ingestion without polling overhead
  • You’re integrating with systems that support outbound webhooks
For systems that only support request/response (no push), use the API Source instead.