# Connectors

A connector is a pipeline that runs **on the server**. A **sink** subscribes to the log and pushes
records out to an external system. A **source** does the reverse: it receives from an external system
and appends to a stream. Nothing runs in your application.

```d2 layout=elk
direction: right

Producer: Producer system

KurrentDB: {
  Source connector: {
    Receive -> Append
  }

  Streams

  Sink connector: {
    Subscription -> Filter -> Sink
  }

  Source connector.Append -> Streams
  Streams -> Sink connector.Subscription
}

Consumer: Consumer system

Producer -> KurrentDB.Source connector.Receive
KurrentDB.Sink connector.Sink -> Consumer
```

That placement is the whole point. A subscription service you write yourself has to be hosted,
observed and checkpointed. A catch-up subscription must also run as a single instance to preserve
order, which makes that instance a single point of failure. The connector runtime is the server's
problem instead of yours.

:::note
The connector plugin ships in every KurrentDB binary and is enabled by default. To turn it off:

```yaml
Connectors:
  Enabled: false
```

For configuration mechanisms other than YAML, see the
[configuration guide](https://docs.kurrent.io/server/v26.1/configuration/).
:::

## What you can create

`instanceTypeName` picks the implementation. Because the implementations ship with the server, this
list tracks the **server** version, not the SDK. It is current for KurrentDB 26.1.

### Sinks, which move records out

| `instanceTypeName` | Writes to | Since |
|---|---|---|
| [`http-sink`](/kurrent-surge/client/connectors/sinks/http/) | Any HTTP endpoint | 24.10 |
| [`serilog-sink`](/kurrent-surge/client/connectors/sinks/serilog/) | A Serilog sink: console, file or Seq | 24.10 |
| [`kafka-sink`](/kurrent-surge/client/connectors/sinks/kafka/) | A Kafka topic | 24.10 |
| [`mongo-db-sink`](/kurrent-surge/client/connectors/sinks/mongo/) | A MongoDB collection | 24.10 |
| [`rabbit-mq-sink`](/kurrent-surge/client/connectors/sinks/rabbitmq/) | A RabbitMQ exchange | 24.10 |
| [`elasticsearch-sink`](/kurrent-surge/client/connectors/sinks/elasticsearch/) | An Elasticsearch index | 25.0 |
| [`pulsar-sink`](/kurrent-surge/client/connectors/sinks/pulsar/) | A Pulsar topic | 25.1 |
| [`sql-sink`](/kurrent-surge/client/connectors/sinks/sql/) | SQL Server or PostgreSQL | 26.0 |

### Sources, which move records in

| `instanceTypeName` | Reads from | Since |
|---|---|---|
| [`kafka-source`](/kurrent-surge/client/connectors/sources/kafka/) | A Kafka topic | 26.0 |
| [`webhook-source`](/kurrent-surge/client/connectors/sources/webhook/) | `POST /webhook/{connectorId}` | 26.1 |

Each page carries that connector's settings and says whether it needs a license. Three connectors run
without a license key: `http-sink`, `serilog-sink` and `webhook-source`. The server refuses to start
a licensed feature without a key. Reach for `serilog-sink` when you want to watch a connector work
before buying anything.

A source is not a sink with the arrow reversed. It receives and appends, and there is no filter or
transformer in the path:

```d2 layout=elk
direction: right

Origin: Kafka, a webhook caller

Source connector: {
  Receive -> Append
}

KurrentDB: {
  Streams
  Checkpoints
}

Origin -> Source connector.Receive: messages
Source connector.Append -> KurrentDB.Streams: records
Source connector.Append -> KurrentDB.Checkpoints: position
```

:::caution
A source therefore takes `instanceTypeName` and nothing else from the shared settings. The
subscription, transformer, resilience and autocommit blocks are sink-only, and setting them on a
source does nothing. A source still has required settings of its own, on its own page.
:::

## Managing them from the SDK

`client.Connectors` creates and controls connectors. It manages their lifecycle; it does not
implement them and it does not validate their settings.

```csharp
await client.Connectors.Create("orders-to-kafka", settings);
```

[Managing connectors](/kurrent-surge/client/connectors/manage/) is the full lifecycle,
[How Sinks Work](/kurrent-surge/client/connectors/sinks/) covers filters, transformations
and delivery, [How Sources Work](/kurrent-surge/client/connectors/sources/) covers the
ingest side, [Data Protection](/kurrent-surge/client/connectors/data-protection/) covers encrypted
settings, and [Observability](/kurrent-surge/client/connectors/observability/) is what a running
connector reports.