mirror of
https://github.com/floci-io/floci.git
synced 2026-11-26 07:11:11 -05:00
* feat(pipes): support Kafka pipe sources and polling Add EventBridge Pipes support for Amazon MSK and self-managed Kafka sources exposed via `smk://`. Introduce Kafka consumer management for bootstrap resolution, consumer group selection, topic validation, and safe reuse across poll cycles. Extend the Pipes poller and tests to filter decoded Kafka payloads, deliver the expected record shape, and commit offsets only after successful delivery. * fix(pipes): tighten Kafka validation and commit handling Clarify Kafka validation errors, avoid duplicate Kafka record transformation, commit delivered Kafka offsets per partition for non-Lambda targets, and remove reflective poller test access. * fix(pipes): stabilise Kafka poller event handling Use a consistent Kafka partition type, narrow JSON decode error handling, remove reflection from manager tests, and tighten no-commit assertions for failed Kafka delivery paths. * fix(pipes): preserve Kafka nulls and commit progress Preserve null Kafka key and value fields, encode Kafka headers consistently, and commit Lambda Kafka progress per partition so successfully processed records are not replayed after later failures. * fix(msk): align broker metadata and Kafka event payloads
2.3 KiB
2.3 KiB
EventBridge Pipes
Protocol: REST-JSON
Endpoint: POST http://localhost:4566/
Supported Actions
| Action | Description |
|---|---|
CreatePipe |
Create a new pipe with source, target, and optional enrichment |
DescribePipe |
Get pipe details including state and configuration |
UpdatePipe |
Update pipe configuration (source, target, role, enrichment, desired state) |
DeletePipe |
Delete a pipe |
ListPipes |
List all pipes with optional filtering by state and prefix |
StartPipe |
Start a stopped pipe |
StopPipe |
Stop a running pipe |
Configuration
| Variable | Default | Description |
|---|---|---|
FLOCI_SERVICES_PIPES_ENABLED |
true |
Enable or disable the service |
Examples
export AWS_ENDPOINT_URL=http://localhost:4566
# Create a pipe (SQS to Lambda)
aws pipes create-pipe \
--name my-pipe \
--source "arn:aws:sqs:us-east-1:000000000000:source-queue" \
--target "arn:aws:lambda:us-east-1:000000000000:function:my-function" \
--role-arn "arn:aws:iam::000000000000:role/pipe-role" \
--endpoint-url $AWS_ENDPOINT_URL
# Describe a pipe
aws pipes describe-pipe \
--name my-pipe \
--endpoint-url $AWS_ENDPOINT_URL
# List all pipes
aws pipes list-pipes \
--endpoint-url $AWS_ENDPOINT_URL
# Start a pipe
aws pipes start-pipe \
--name my-pipe \
--endpoint-url $AWS_ENDPOINT_URL
# Stop a pipe
aws pipes stop-pipe \
--name my-pipe \
--endpoint-url $AWS_ENDPOINT_URL
# Update a pipe
aws pipes update-pipe \
--name my-pipe \
--target "arn:aws:lambda:us-east-1:000000000000:function:new-function" \
--endpoint-url $AWS_ENDPOINT_URL
# Delete a pipe
aws pipes delete-pipe \
--name my-pipe \
--endpoint-url $AWS_ENDPOINT_URL
Pipe States
STARTING- Pipe is being startedRUNNING- Pipe is actively processing eventsSTOPPING- Pipe is being stoppedSTOPPED- Pipe is stopped and not processing eventsDELETED- Pipe has been deleted
Supported Sources and Targets
Floci emulates EventBridge Pipes with the following supported source and target types:
Sources:
- Amazon SQS queues
- Amazon Kinesis streams
- Amazon DynamoDB streams
- Kafka topics (MSK and self-managed via
smk://)
Targets:
- Lambda functions
- SQS queues
- SNS topics
- Kinesis streams
- Step Functions state machines