接收器配置设置

连接器设置

名称 描述

connector.class 必填

org.neo4j.connectors.kafka.sink.Neo4jConnector

key.converter 必填

兼容的 Kafka Connect 转换器。

可以是以下之一;

  • io.confluent.connect.avro.AvroConverter

  • io.confluent.connect.json.JsonSchemaConverter

  • io.confluent.connect.protobuf.ProtobufConverter

key.converter.schema.registry.url

消息键的模式注册表 URL。当配置的 key.converter 需要模式注册表时,需要此项。

key.converter.optional.for.nullables

key.converterio.confluent.connect.protobuf.ProtobufConverter 时,应设置为 true

value.converter 必填

兼容的 Kafka Connect 转换器。

可以是以下之一;

  • io.confluent.connect.avro.AvroConverter

  • io.confluent.connect.json.JsonSchemaConverter

  • io.confluent.connect.protobuf.ProtobufConverter

value.converter.schema.registry.url

消息值的模式注册表 URL。当配置的 value.converter 需要模式注册表时,需要此项。

value.converter.optional.for.nullables

key.converterio.confluent.connect.protobuf.ProtobufConverter 时,应设置为 true

Neo4j 连接设置

名称 描述

neo4j.uri 必填

要连接到的 Neo4j URI。可以使用 , 分隔指定多个 URI。

neo4j.database

要连接到的 Neo4j 数据库名称。建议明确指定。

neo4j.authentication.type 必填

要使用的身份验证类型。NONEBASICKERBEROSBEARERCUSTOM 之一

默认值:BASIC

neo4j.authentication.basic.username

用于身份验证的用户名。当 neo4j.authentication.typeBASIC 时,需要此项。

neo4j.authentication.basic.password

用于身份验证的密码。当 neo4j.authentication.typeBASIC 时,需要此项。

neo4j.authentication.basic.realm

用于身份验证的身份验证域,留空以使用默认值。

neo4j.authentication.kerberos.ticket

用于建立连接的 Kerberos 票据。当 neo4j.authentication.typeKERBEROS 时,需要此项。

neo4j.authentication.bearer.token

用于建立连接的 Bearer 令牌。当 neo4j.authentication.typeBEARER 时,需要此项。

neo4j.authentication.custom.scheme

用于建立连接的自定义身份验证方案。当 neo4j.authentication.typeCUSTOM 时,需要此项。

neo4j.authentication.custom.principal

用于建立连接的自定义主体。当 neo4j.authentication.typeCUSTOM 时,需要此项。

neo4j.authentication.custom.credentials

用于建立连接的自定义凭据。当 neo4j.authentication.typeCUSTOM 时,需要此项。

neo4j.authentication.custom.realm

用于身份验证的自定义身份验证域,根据您的自定义身份验证提供程序的要求进行设置。

neo4j.connection-timeout

TCP 连接超时(有效单位:mssmhd;默认单位为 s)。

默认值:30s(驱动程序默认值)

neo4j.pool.max-connection-pool-size

要保存在连接池中的最大连接数。

默认值:100(驱动程序默认值)

neo4j.pool.connection-acquisition-timeout

从连接池获取连接的最大等待时间(有效单位:mssmhd;默认单位为 s)。

默认值:60s(驱动程序默认值)

neo4j.pool.idle-time-before-connection-test

空闲连接在测试其活动性之前持续的时间(有效单位:mssmhd;默认单位为 s)。

默认值:不测试(驱动程序默认值)

neo4j.pool.max-connection-lifetime

连接从连接池中删除之前持续的时间(有效单位:`mssmhd;默认单位为 s)。

默认值:1h(驱动程序默认值)

neo4j.max-retry-time

重试事务的最大持续时间。

默认值:30s

neo4j.security.encrypted

是否启用加密。仅当在 neo4j.uri 中使用 boltneo4j 方案时适用。truefalse 之一

默认值:false

neo4j.security.trust-strategy

用于 TLS 连接的信任策略。TRUST_ALL_CERTIFICATESTRUST_SYSTEM_CA_SIGNED_CERTIFICATESTRUST_CUSTOM_CA_SIGNED_CERTIFICATES 之一 当 neo4j.security.encryptedtrue 时,需要此项。

默认值:TRUST_SYSTEM_CA_SIGNED_CERTIFICATES

neo4j.security.cert-files

包含要信任的 CA 的 X509 证书的文件列表。当 neo4j.security.trust-strategyTRUST_CUSTOM_CA_SIGNED_CERTIFICATES 时,需要此项。

neo4j.security.hostname-verification-enabled

在 TLS 握手期间是否启用主机名验证。truefalse 之一。

默认值:true

通用接收器设置

名称 描述

neo4j.batch-size

每个主题每个事务处理的最大消息数。

默认值:1000

neo4j.batch-timeout

批处理允许处理的最大时间(有效单位:mssmhd;默认单位为 s)。

默认值:0s

Cypher 策略设置

名称 描述

neo4j.cypher.topic.{NAME}

要为指定主题运行的 Cypher 语句。例如:"neo4j.cypher.topic.my-topic": "MERGE (n:Person {name: __value.name})"

neo4j.cypher.bind-timestamp-as

在用户提供的 Cypher 语句中绑定消息时间戳的名称。设置为空字符串以禁用绑定消息时间戳。

默认值:__timestamp

neo4j.cypher.bind-header-as

在用户提供的 Cypher 语句中绑定消息头的名称。消息头将绑定为 header 名称到对应值的映射。设置为空字符串以禁用绑定消息头。

默认值:__header

neo4j.cypher.bind-key-as

在用户提供的 Cypher 语句中绑定消息键的名称。设置为空字符串以禁用绑定消息键。

默认值:__key

neo4j.cypher.bind-value-as

在用户提供的 Cypher 语句中绑定消息值的名称。设置为空字符串以禁用绑定消息值。

默认值:__value

neo4j.cypher.bind-value-as-event

消息值是否将在用户提供的 Cypher 语句中绑定为“事件”,以实现向后兼容性。

默认值:true

模式策略设置

名称 描述

neo4j.pattern.topic.{NAME}

要应用于从指定主题接收的消息的节点或关系模式。例如:"neo4j.pattern.topic.user": "(:User\{!userId})" 例如:"neo4j.pattern.topic.user": "(:User\{!userId})-[:KNOWS]→(:User\{!otherUserId})"

neo4j.pattern.merge-node-properties

是否将传入属性与节点的现有属性合并。

默认值:false

neo4j.pattern.merge-relationship-properties

是否将传入属性与关系的现有属性合并。

默认值:false

neo4j.pattern.bind-timestamp-as

在模式中绑定消息时间戳的名称。设置为空字符串以禁用绑定消息时间戳。

默认值:__timestamp

neo4j.pattern.bind-header-as

在模式中绑定消息头的名称。消息头将绑定为 header 名称到对应值的映射。设置为空字符串以禁用绑定消息头。

默认值:__header

neo4j.pattern.bind-key-as

在模式中绑定消息键的名称。设置为空字符串以禁用绑定消息键。

默认值:__key

neo4j.pattern.bind-value-as

在模式中绑定消息值的名称。设置为空字符串以禁用绑定消息值。

默认值:__value

CDC 策略设置

名称 描述

neo4j.cdc.schema.topics

包含此连接器的 Source 实例使用 CDC 源策略生成的 CDC 事件的主题。

neo4j.cdc.source-id.topics

包含此连接器的 Source 实例使用 CDC 源策略生成的 CDC 事件的主题。

neo4j.cdc.source-id.label-name

CDC Source Id策略管理的节点所附加的标签名称。

默认值:SourceEvent

neo4j.cdc.source-id.property-name

CDC Source Id策略管理的节点所附加的 ID 属性名称。

默认值:sourceId

CUD 策略设置

名称 描述

neo4j.cud.topics

包含 CUD 事件的主题。