Skip to main content
Version: 2.3.2

RocketMQ

RocketMQ sink connector

Description​

Write Rows to a Apache RocketMQ topic.

Key features​

By default, we will use 2pc to guarantee the message is sent to RocketMQ exactly once.

Options​

nametyperequireddefault value
topicstringyes-
name.srv.addrstringyes-
acl.enabledBooleannofalse
access.keyStringno
secret.keyStringno
producer.groupStringnoSeaTunnel-producer-Group
semanticstringnoNON
partition.key.fieldsarrayno-
formatStringnojson
field.delimiterStringno,
common-optionsconfigno-

topic [string]​

RocketMQ topic name.

name.srv.addr [string]​

RocketMQ name server cluster address.

semantic [string]​

Semantics that can be chosen EXACTLY_ONCE/AT_LEAST_ONCE/NON, default NON.

partition.key.fields [array]​

Configure which fields are used as the key of the RocketMQ message.

For example, if you want to use value of fields from upstream data as key, you can assign field names to this property.

Upstream data is the following:

nameagedata
Jack16data-example1
Mary23data-example2

If name is set as the key, then the hash value of the name column will determine which partition the message is sent to.

format​

Data format. The default format is json. Optional text format. The default field separator is ",". If you customize the delimiter, add the "field_delimiter" option.

field_delimiter​

Customize the field delimiter for data format.

common options [config]​

Sink plugin common parameters, please refer to Sink Common Options for details.

Examples​

sink {
Rocketmq {
name.srv.addr = "localhost:9876"
topic = "test-topic-003"
partition.key.fields = ["name"]
}
}