RocketMQ
Last updated
Last updated
RocketMQ sink connector
4.9.0 (Or a newer version, for reference)
By default, we will use 2pc to guarantee the message is sent to RocketMQ exactly once.
Write Rows to a Apache RocketMQ topic.
topic
string
yes
-
RocketMQ topic
name.
name.srv.addr
string
yes
-
RocketMQ
name server cluster address.
acl.enabled
Boolean
no
false
false
access.key
String
no
When ACL_ENABLED is true, access key cannot be empty
secret.key
String
no
When ACL_ENABLED is true, secret key cannot be empty
producer.group
String
no
Nexus-producer-Group
Nexus-producer-Group
partition.key.fields
array
no
-
-
format
String
no
json
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
String
no
,
Customize the field delimiter for data format.
producer.send.sync
Boolean
no
false
If true, the message will be sync sent.
common-options
config
no
-
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:
Jack
16
data-example1
Mary
23
data-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.
The data is randomly generated and asynchronously sent to the test topic
Consuming Rocketmq writes to c_int field Hash number of partitions written to different partitions This is the default asynchronous way to write
This is a stream consumption specified time stamp consumption, when there are new partitions added the program will refresh the perception and consumption at intervals, and write to another topic type
Sink plugin common parameters, please refer to for details.