Skip to content

Conversation

@xxyykkxx
Copy link

Purpose of this pull request

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

@HighandLight
Copy link

Hi, The CI is failing due to a formatting issue (Spotless check).
SeaTunnel uses Spotless for code style, so please review the coding guide.

@github-actions github-actions bot removed the e2e label Aug 28, 2025
@Hisoka-X
Copy link
Member

cc @Carl-Zhou-CN as well.

@Hisoka-X
Copy link
Member

@Carl-Zhou-CN
Copy link
Member

@xxyykkxx hi, it seems that the changes don't just work on the flink engine

@xxyykkxx
Copy link
Author

xxyykkxx commented Sep 1, 2025

@xxyykkxx hi, it seems that the changes don't just work on the flink engine

yes,just because this issue can be intuitively identified through Flink monitoring

@Hisoka-X Hisoka-X changed the title [Bug] [RocketMQ Source] Only one parallism comsumer data in Fink Engine #9706 [Fix][Connector-V2] Fix RocketMQ parallism read on work well Sep 1, 2025
@Hisoka-X
Copy link
Member

Hisoka-X commented Sep 1, 2025

@xxyykkxx hi, it seems that the changes don't just work on the flink engine

I changed the title. Please continue review this PR @Carl-Zhou-CN . Thanks.

@Carl-Zhou-CN
Copy link
Member

@xxyykkxx hi, it seems that the changes don't just work on the flink engine

I changed the title. Please continue review this PR @Carl-Zhou-CN . Thanks.

Sure, this is what I should do

Supplier<RocketMQPartitionSplitReader> splitReader =
() -> new RocketMQPartitionSplitReader(this.metadata, readerContext);

RocketMQSourceFetcherManager kafkaSourceFetcherManager =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RocketMQSourceFetcherManager kafkaSourceFetcherManager =
RocketMQSourceFetcherManager rocketMQSourceFetcherManager =


return new RocketMqSourceReader(
elementsQueue,
kafkaSourceFetcherManager,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kafkaSourceFetcherManager,
rocketMQSourceFetcherManager,

outputCollector.output = collector;
reportMetrics(consumerRecord);
deserializationSchema.deserialize(consumerRecord.getBody(), outputCollector);
// consumerRecord.offset + 1 is the offset commit to Kafka and also the start offset
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// consumerRecord.offset + 1 is the offset commit to Kafka and also the start offset
// consumerRecord.offset + 1 is the offset commit to RocketMQ and also the start offset

return recordsBySplits;
}
try {
messageExts = consumer.poll(pollTimeOut);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a parameter to control pollTimeOut?


/**
* @author 02211659 bianxiang
* @date 2025-08-19 10:06:05
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete,we have git

public class RocketMqRecordEmitter
implements RecordEmitter<MessageExt, SeaTunnelRow, RocketMQPartitionSplitState> {

private static final Logger logger = LoggerFactory.getLogger(RocketMqRecordEmitter.class);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

// Set `rocketmq.client.logUseSlf4j` to `true` to avoid create many
// `AsyncAppender-Dispatcher-Thread`
System.setProperty("rocketmq.client.logUseSlf4j", "true");
initialRocketMQConsumer(config);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better if we reused the implementation within RocketMqAdminUtil here?

Thread thread = new Thread(runnable);
thread.setDaemon(true);
thread.setName("RocketMq-messageQueue-dynamic-discovery");
thread.setName("kafka-partition-dynamic-discovery");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming errors

// initialization scenario
if (offset <= -2) {
throw new RuntimeException(
"An error occurred while fetching offset,please check up server's log");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will continue to maintain RocketMqConnectorException better?

break;
default:
throw new IllegalArgumentException(
"current startMode is not supported" + metadata.getStartMode());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity for 120 days. It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants