> 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

{% 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
