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 kafka

kafka

descriptionYes-NoName of the connection object.

"MyApache KafkaConnection"

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 connection will use.["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7", "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"]
propertiesYes-NoConfiguration object
serveryes-YesThe Kafka server(s) hostnames fololowed by the port. "localhost:9092"
stopOnScanErroryestruenoCheck if you want the connector to stop crawing when an error is encountered."true"
offsetsyesearliestnoStarting offset for ful 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 of the connection to update"89d6632a-a296-426c-adb0-d442adcab4b0",
descriptionNo-NoName of the connection object.

"MyImage RemovedMyApacheKafka Connection"

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 connection will use.["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7", "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"]
propertiesYes-NoConfiguration object

Example


serveryes-YesThe Kafka server(s) hostnames fololowed by the port. "localhost:9090"
stopOnScanErroryestruenoCheck if you want the connector to stop crawing when an error is encountered."false"
offsetsyesearliestnoStarting offset for ful 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
Code Block
themeRDark
{
  "type": "kafka",
  "description": "Kafka Demo",
  "properties": {
      "multipleStartPoints": "false",
      "url": "//opt//aspire",
      "partialScan": "true",
      "subDirUrl": null,
      "indexContainersthrottlePolicy": "false"null,
      "scanRecursivelyproperties": "true",{
      "scanExcludedItemsserver": "falselocalhost:9090",
      "ignoreScanErrorsstopOnScanError": "false",
      "ignoreSymLinksoffsets": "false",{
      "useACLsaltPull": "falseAlpha",
      "aclsdebug": null,
"Test Text Outer field   "includes": null,set"
      "excludes": null
  }
  }
}

Update Connection

Field

Required

Default

Multiple

Notes

Example

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

"MyImage RemovedConnection"

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 connection will use.["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7", "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"]propertiesYes-NoConfiguration objectstopOnScanErrorNotrueNoIf enabled, the crawl will stop if there is an error on the scan phase.true / falseurlYes
-NoPath of the base directory to crawl. All the seeds will be prefixed with this value to form the full path. All seeds will be prefixed with this value to form the full path"C:\\Directory"

Example

Create Connector Instance


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

Update Connector Instance

For the update 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 kafka

be dbconnector.

"kafka"

descriptionYes-NoName of the seed object.

"

My Apache Kafka

My ApacheKafka Connector Seed"

connectorYes-NoThe
id
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
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
IDs of the workflows that will be executed for the documents crawled.["f8c414cb-1f5d-42ef-9cc9-5696c3f0bda4"]
throttlePolicyNo-No
Id
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 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"]
Example 
propertiesYes-NoConfiguration object
"seed"Yes-NoSeed to crawl."topic"
Code Block
themeRDark
titlePOST aspire/_api/seeds
{
  "seed": "topic",
  "type": "kafka",
    "seeddescription": "directorykafkaSeed_1",
    "connector": "82f7f0a49c59ad21-8d284321-47ce41c9-8c9daaad-e3ca414b0d312a5e30145b83",
    "descriptionconnection": "kafka_Test_Seed890083fd-39a2-47e7-a213-0051f4715cda",
    "connectionworkflows": "602d3700-28dd-4a6a-8b51-e4a663fe9ee6"[
    "f51f5162-faaf-43dc-aa89-3b872160f504"
  ],
  "tags": [],
  "properties": {
    "workflowsseed": ["f8c414cb-1f5d-42ef-9cc9-5696c3f0bda4"]
}"topic"
  }
}

Example 


Update Seed


Field

Required

Default

Multiple

Notes

Example

id

seedYes-No
Id of the seed to update."2f287669-d163-4e35-ad17-6bbfe9df3778"
<seed description>"kafka_seed"
typeYes
seedNo
-No

The value must be dbconnector.

"kafka"

<seed description>

description
No
Yes-NoName of the seed object.

"

MyApache KafkaSeed

My Kafka connector Seed"

connector
No
Yes-NoThe
id
ID of the connector to be used with this seed. The connector type must match the seed type."82f7f0a4-8d28-47ce-8c9d-e3ca414b0d31"
connection
No
Yes-NoThe
id
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
IDs of the workflows that will be executed for the documents crawled.["f8c414cb-1f5d-42ef-9cc9-5696c3f0bda4"]
workflows.addNo[ ]YesThe ids of the workflows to add.["f8c414cb-1f5d-42ef-9cc9-5696c3f0bda4"]workflows.removeNo[ ]YesThe ids of the workflows to remove.["f8c414cb-1f5d-42ef-9cc9-5696c3f0bda4"]
throttlePolicyNo-No
Id
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 seed will use.["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7", "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"]
routingPolicies.addroutingPolicies.removeNo[ ]YesThe ids of the routingPolicies to remove.["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7"]
No[ ]YesThe ids of the routingPolicies to add.["b4d2579f-1a0a-4a8b-9fd4-d42780003b36"]
tagsNo[ ]YesThe tags of the seed. These can be used to filter the seed.["tag1", "
tag3
tag2"]
tags.addNo[ ]YesThe tags to add["tag4"]tags.removeNo[ ]YesThe tags to remove["tag2"]
propertiesYes-NoConfiguration object


















Example 

Code Block
themeRDark
titlePUT aspire/_api/seeds/2f287669-d163-4e35-ad17-6bbfe9df3778
{
    "id": "2f28766989008555-d16339add-4e3547e7a213-ad17-6bbfe9df37780051f4715cda",
    "seedtype": "C:\\test\\kafka",
    "connectordescription": "82f7f0a4-8d28-47ce-8c9d-e3ca414b0d31kafkaConnection description",
  "credential": null,
  "descriptionthrottlePolicy": "kafka_Test_Seed",null,
  "properties": {
    "throttlePolicyserver": "6b8b5f23-fc77-47a1-9b58-106577162e7blocalhost:9090",
    "routingPoliciesstopOnScanError": ["313de87c-3cb9-4fe0-a2cb-17f75ce7d0c7", "b4d2579f-1a0a-4a8b-9fd4-d42780003b36"],true,
    "offsets": {
      "connectionaltPull": "602d3700-28dd-4a6a-8b51-e4a663fe9ee6Alpha",
      "workflowsdebug": ["b255e950-1dac-46dc-8f86-1238b2fbdf27"],"Test Text Outer field set"
    }
  }
}