Skip to content

Connectors ​

onestep 1.x uses Source for input and Sink for output. Many connectors implement both, so they can be consumed by tasks and also receive upstream task return values.

Built-in Connectors ​

In-Memory ​

ConnectorSourceSinkDescription
MemoryYesYesIn-memory queue, suitable for development and testing

Timers ​

ConnectorSourceSinkDescription
IntervalYesNoFixed interval trigger
CronYesNoCron expression trigger

Message Queues ​

ConnectorSourceSinkDescription
Redis StreamsYesYesRedis Streams message queue, install onestep-redis
RabbitMQYesYesRabbitMQ queue, install onestep-mq
AWS SQSYesYesAWS SQS managed queue, install onestep-sqs
AWS SNSNoYesAWS SNS topic fan-out sink, install onestep-sqs
KafkaYesYesKafka topic source/sink, install onestep-kafka
Cloudflare QueuesYesYesCloudflare managed queue pull/push, install onestep-cf-queues

Databases ​

ConnectorSourceSinkDescription
SQL (MySQL / PostgreSQL)YesYesTable queue/incremental sync/binlog CDC/table sink/tracked execution, install onestep-sql[mysql] or onestep-sql[postgres]
MongoDBYesYesCollection polling/Change Stream/table sink, install onestep-mongodb
Elasticsearch / OpenSearchNoYesAsync bulk Sink, install onestep-elasticsearch
ClickHouseNoYesAsync confirmed table output Sink, install onestep-clickhouse
Feishu BitableYesYesFeishu Bitable incremental sync/table sink, install onestep-feishu-bitable

Web ​

ConnectorSourceSinkDescription
WebhookYesNoHTTP request reception
HTTP SinkNoYesHTTP JSON request output

Custom ​

ConnectorSourceSinkDescription
CustomYesYesImplement any data source

Selection Guide ​

Development & Testing ​

python
from onestep import MemoryQueue

source = MemoryQueue("test")

Production - Distributed Tasks ​

python
from onestep_rabbitmq import RabbitMQConnector

rmq = RabbitMQConnector("amqp://...")
source = rmq.queue("jobs")

Production - Cloud Native ​

python
from onestep_sqs import SQSConnector

sqs = SQSConnector(region_name="us-east-1")
source = sqs.queue("https://sqs...")

Database Driven ​

python
from onestep_sql.mysql import MySQLConnector

db = MySQLConnector("mysql+pymysql://...")
source = db.table_queue(
    table="tasks",
    key="id",
    where="status = 0",
    claim={"status": 1},
    ack={"status": 2},
    nack={"status": 0},
)

Scheduled Tasks ​

python
from onestep import CronSource, IntervalSource

# Fixed interval
source = IntervalSource.every(minutes=5)

# Specific time
source = CronSource("0 9 * * *")

External Integration ​

python
from onestep import HttpSink, WebhookSource

# Receive external system push
source = WebhookSource(path="/webhooks/github")

# Send processing results to external HTTP endpoint
sink = HttpSink("notify", url="https://example.com/hooks/events")

YAML Configuration ​

yaml
resources:
  memory:
    type: memory
  
  timer:
    type: interval
    minutes: 5
  
  cron:
    type: cron
    expression: "0 9 * * *"
  
  rmq:
    type: rabbitmq
    url: "amqp://..."
  
  jobs:
    type: rabbitmq_queue
    connector: rmq
    queue: "jobs"
  
  db:
    type: mysql
    dsn: "mysql+pymysql://..."
  
  tasks:
    type: mysql_table_queue
    connector: db
    table: "tasks"
  
  webhook:
    type: webhook
    path: "/webhook"
    port: 8080

  notify:
    type: http_sink
    url: "https://example.com/hooks/events"

tasks:
  - name: process_jobs
    source: jobs
    emit: notify
    handler:
      ref: myapp:process_jobs

YAML registers resource types through installed plugins. Before using rabbitmq, redis_stream, sqs_queue, mysql_table_queue, postgres_incremental, mongodb_polling, elasticsearch_bulk_sink, clickhouse_table_sink, kafka_topic or feishu_bitable_*, install the corresponding plugin in the worker environment.

Custom Source/Sink ​

Refer to Custom Broker to implement custom data sources.

Next Steps ​

Released under the MIT License.