Skip to content

Conversation

@epiao55
Copy link
Contributor

@epiao55 epiao55 commented Jul 3, 2023

Fixes #4011.
add kafkaConnector module, include sink and source

Jett added 3 commits July 2, 2023 23:02
…kafka_source_sink

# Conflicts:
#	eventmesh-connectors/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/server/KafkaConnectServer.java
#	eventmesh-connectors/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/sink/connector/KafkaSinkConnector.java
#	eventmesh-connectors/eventmesh-connector-kafka/src/main/java/org/apache/eventmesh/connector/kafka/source/connector/KafkaSourceConnector.java
#	eventmesh-connectors/eventmesh-connector-kafka/src/main/resources/server-config.yml
#	eventmesh-connectors/eventmesh-connector-kafka/src/main/resources/sink-config.yml
#	eventmesh-connectors/eventmesh-connector-kafka/src/main/resources/source-config.yml
@epiao55 epiao55 changed the title [ISSUE apache#4011] add kafkaConnector module [ISSUE #4011] add kafkaConnector module Jul 3, 2023
@epiao55
Copy link
Contributor Author

epiao55 commented Jul 4, 2023

@qqeasonchen @xwm1992 PTAL

Copy link
Member

@mxsm mxsm left a comment

Choose a reason for hiding this comment

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

@epiao55 Please fix code style

@codecov
Copy link

codecov bot commented Jul 6, 2023

Codecov Report

Merging #4180 (d29324a) into master (cc43dee) will increase coverage by 0.15%.
The diff coverage is n/a.

❗ Current head d29324a differs from pull request most recent head 0c43495. Consider uploading reports for the commit 0c43495 to get more accurate results

@@             Coverage Diff              @@
##             master    #4180      +/-   ##
============================================
+ Coverage     16.77%   16.92%   +0.15%     
+ Complexity     1415     1412       -3     
============================================
  Files           592      589       -3     
  Lines         26040    25789     -251     
  Branches       2400     2397       -3     
============================================
- Hits           4367     4366       -1     
+ Misses        21235    20986     -249     
+ Partials        438      437       -1     

see 51 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@epiao55
Copy link
Contributor Author

epiao55 commented Jul 6, 2023

I have fixed style @mxsm

@epiao55
Copy link
Contributor Author

epiao55 commented Jul 6, 2023

PTAL~ @xwm1992

xwm1992
xwm1992 previously approved these changes Jul 7, 2023
@epiao55 epiao55 requested review from Alonexc and mxsm July 7, 2023 08:20
Comment on lines 53 to 62
public void init(Config config) throws Exception {
this.sourceConfig = (KafkaSourceConfig) config;
Properties props = new Properties();
props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, sourceConfig.getConnectorConfig().getBootstrapServers());
props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
props.put(ConsumerConfig.GROUP_ID_CONFIG, sourceConfig.getConnectorConfig().getGroupID());
props.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, "false");

this.kafkaConsumer = new KafkaConsumer<String, String>(props);
Copy link
Member

Choose a reason for hiding this comment

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

How about add max.poll.records to KafkaConsumer?The exact numbers are placed in the configuration file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok,i have added some defalut config for kafka connector

add default config for kafka sink and source
@epiao55 epiao55 requested review from mxsm and xwm1992 July 20, 2023 13:39
@epiao55
Copy link
Contributor Author

epiao55 commented Jul 20, 2023

@xwm1992 please help trigger the build, tks

@xwm1992 xwm1992 merged commit 6c94d9d into apache:master Jul 21, 2023
@pandaapo pandaapo added this to the 1.10 milestone Dec 5, 2023
xuhongjia pushed a commit to Deckers-Ohana/eventmesh that referenced this pull request Mar 13, 2025
* [ISSUE apache#4011] add kafkaConnector module

* [ISSUE apache#4011] add kafkaConnector module

* [ISSUE apache#4011] fix codestyle

* Fixes apache#4011.
add default config for kafka sink and source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add Source Connector Kafka, Sink Connector Kafka module

5 participants