Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Apache Kafka Connector can be configured using the Rest API. It requires the following entities to be created:

  • Credential
  • Connection
  • Connector
  • Seed

Below are the examples of how to create the Connection and the Seed. For the Connector, please check this page.

Easy Heading Free
navigationTitleOn this Page
wrapNavigationTexttrue
navigationExpandOptionexpand-all-by-default

Create Connection


Field

Required

Default

Multiple

Notes

Example

typeYes-No

The value must be kafkabe Kafka.

kafka

descriptionYes-NoName of the connection object.

"MyApache KafkaConnection"

throttlePolicyNo-NoId ID of the throttle policy that applies to this connection object."f5587cee-9116-4011-b3a9-6b235b333a1b"
routingPoliciesNo[ ]YesThe ids IDs of the routing policies that this connection will use.["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7", "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"]
propertiesYes-NoConfiguration object
serveryes-YesThe Kafka server(s) hostnames fololowed followed by the port. "localhost:9092"
stopOnScanErroryestruenoCheck if you want the connector to stop crawing crawling when an error is encountered."true"
offsetsyesearliestnoStarting offset for ful a full crawl."offsets": {
      "altPull": "Alpha",
      "debug": "Test Text Outer field set"
    }

Example

Code Block
themeRDark
titlePOST aspire/_api/connections
{
  "type": "kafka",
  "description": "kafkaConnection_1",
  "properties": {
    "server": "localhost:9093",
    "stopOnScanError": true,
    "offsets": {
      "altPull": "Alpha",
      "debug": "Test Text Outer field set"
    }
  }
}

Update Connection


Field

Required

Default

Multiple

Notes

Example

idYes-NoId ID of the connection to update"89d6632a-a296-426c-adb0-d442adcab4b0",
descriptionNo-NoName of the connection object.

"MyApacheKafka Connection"

throttlePolicyNo-NoId ID of the throttle policy that applies to this connection object."f5587cee-9116-4011-b3a9-6b235b333a1b"
routingPoliciesNo[ ]YesThe ids IDs of the routing policies that this connection will use.["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7", "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"]
propertiesYes-NoConfiguration object
serveryes-YesThe Kafka server(s) hostnames fololowed followed by the port. "localhost:9090"
stopOnScanErroryestruenoCheck if you want the connector to stop crawing crawling when an error is encountered."false"
offsetsyesearliestnoStarting offset for ful a full crawl."offsets": {
      "altPull": "Alpha",
      "debug": "Test Text Outer field set"
    }

Example

Code Block
themeRDark
{
  "id": "890083fd-39a2-47e7-a213-0051f4715cda",
  "type": "kafka",
  "description": "kafkaConnection description",
  "credential": null,
  "throttlePolicy": null,
  "properties": {
    "server": "localhost:9090",
    "stopOnScanError": false,
    "offsets": {
      "altPull": "Alpha",
      "debug": "Test Text Outer field set"
    }
  }
}

Create Connector Instance


For the creation of the Connector object using the Rest API check this page

Create Seed


Field

Required

Default

Multiple

Notes

Example

seedYes-No<seed description>"topic"
typeYes-No

The value must be dbconnector.

"kafka"

descriptionYes-NoName of the seed object.

"My ApacheKafka Connector Seed"

connectorYes-NoThe ID of the connector to be used with this seed. The connector type must match the seed type."82f7f0a4-8d28-47ce-8c9d-e3ca414b0d31"
connectionYes-NoThe ID of the connection to be used with this seed. The connection type must match the seed type."602d3700-28dd-4a6a-8b51-e4a663fe9ee6"
workflowsNo[ ]YesThe IDs of the workflows that will be executed for the documents crawled.["f8c414cb-1f5d-42ef-9cc9-5696c3f0bda4"]
throttlePolicyNo-NoID of the throttle policy that applies to this connection object."f5587cee-9116-4011-b3a9-6b235b333a1b"
routingPoliciesNo[ ]YesThe IDs of the routing policies that this seed will use.["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7", "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"]
tagsNo[ ]YesThe tags of the seed. These can be used to filter the seed.["tag1", "tag2"]
propertiesYes-NoConfiguration object
seedYes-NoSeed to crawl."topic"

Example 

Code Block
themeRDark
titlePOST aspire/_api/seeds
{
  "seed": "topic",
  "type": "kafka",
  "description": "kafkaSeed_1",
  "connector": "9c59ad21-4321-41c9-aaad-2a5e30145b83",
  "connection": "890083fd-39a2-47e7-a213-0051f4715cda",
  "workflows": [
    "f51f5162-faaf-43dc-aa89-3b872160f504"
  ],
  "tags": [],
  "properties": {
    "seed": "topic"
  }
}

Update Seed


Field

Required

Default

Multiple

Notes

Example

seedYes-No<seed description>"topic2"
typeYes-No

The value must be dbconnector.

"kafka"

descriptionYes-NoName of the seed object.

"My Kafka connector Seed"

connectorYes-NoThe ID of the connector to be used with this seed. The connector type must match the seed type."82f7f0a4-8d28-47ce-8c9d-e3ca414b0d31"
connectionYes-NoThe ID of the connection to be used with this seed. The connection type must match the seed type."602d3700-28dd-4a6a-8b51-e4a663fe9ee6"
workflowsNo[ ]YesThe IDs of the workflows that will be executed for the documents crawled.["f8c414cb-1f5d-42ef-9cc9-5696c3f0bda4"]
throttlePolicyNo-NoID of the throttle policy that applies to this connection object."f5587cee-9116-4011-b3a9-6b235b333a1b"
routingPoliciesNo[ ]YesThe IDs of the routing policies that this seed will use.["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7", "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"]
tagsNo[ ]YesThe tags of the seed. These can be used to filter the seed.["tag1", "tag2"]
propertiesYes-NoConfiguration object
seedYes-NoSeed to crawl."topic2"

Example 

Code Block
themeRDark
titlePUT aspire/_api/seeds/2f287669-d163-4e35-ad17-6bbfe9df3778
{
  "id": "5f7b2877-ccc1-41f7-a182-0733712bd7a8",
  "type": "kafka",
  "seed": "topic_copy",
  "connector": "9c59ad21-4321-41c9-aaad-2a5e30145b83",
  "description": "kafkaSeed_1",
  "throttlePolicy": null,
  "connection": "890083fd-39a2-47e7-a213-0051f4715cda",
  "workflows": [
    "f51f5162-faaf-43dc-aa89-3b872160f504"
  ],
  "tags": [],
  "properties": {
    "seed": "topic_copy"
  }
}