> For the complete documentation index, see [llms.txt](https://docs.lenses.io/latest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lenses.io/latest/connectors/contributing/developing-a-connector.md).

# Developing a connector

This section describes how to contribute a new connector to the Stream Reactor.

{% hint style="info" %}
SBT, Java 11, and Scala 2.13 are required.
{% endhint %}

## Setting up a new module

The Stream Reactor is built using SBT. Each connector is defined in a submodule in the root project.

1. Add the new directory called *kafka-connect-**\[your-connector].***
2. Under this add the standard path **/src/main/**

### Package name

Use **io.lenses.streamreactor.connector** as the parent package. The following convention is used but each connector is different and can have more sub packages:

* **config** - configuration and settings
* **sink** - sink connectors, tasks and writers
* **source** - source connectors, task and readers

## **Dependencies**

Dependencies are declared in ***project/Dependencies.scala**.* Add the dependencies for you connector as a new field in the version object and the maven coordinates, for example:

{% code fullWidth="false" %}

```scala
object version {
....
val azureServiceBusVersion = "7.14.7"
...
lazy val azureServiceBus:  ModuleID = "com.azure" % "azure-messaging-servicebus"  % azureServiceBusVersion
```

{% endcode %}

Next, in the ***Dependencies*** trait add a sequence to hold you dependencies:

```scala
val kafkaConnectAzureServiceBusDeps: Seq[ModuleID] = Seq(azureServiceBus)
```

Next, declare the submodule in ***Build.sbt.***

1. Add the project to the subproject list:
2. Defined the dependencies for you module. In this example kafkaConnectAzureServiceBusDeps holds the dependencies defined earlier.

{% code fullWidth="false" %}

```scala
lazy val subProjects: Seq[Project] = Seq(
  `query-language`,
  common,
  `cloud-common`,
  `aws-s3`,
  `azure-documentdb`,
  `azure-datalake`,
  `azure-servicebus`,
  `azure-storage`,
  Cassandra,
  elastic6,
  elastic7,
  ftp,
  `gcp-storage`,
  influxdb,
  jms,
  mongodb,
  mqtt,
  redis,
)

-----

lazy val `azure-servicebus` = (project in file("kafka-connect-azure-servicebus"))
  .dependsOn(common)
  .settings(
    settings ++
      Seq(
        name := "kafka-connect-azure-servicebus",
        description := "Kafka Connect compatible connectors to move data between Kafka and popular data stores",
        libraryDependencies ++= baseDeps ++ kafkaConnectAzureServiceBusDeps,
        publish / skip := true,
        packExcludeJars := Seq(
          "scala-.*\\.jar",
          "zookeeper-.*\\.jar",
        ),
      ),
  )
  .configureAssembly(true)
  .configureTests(baseTestDeps)
  .enablePlugins(PackPlugin)  
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lenses.io/latest/connectors/contributing/developing-a-connector.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
