-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Kafka producer configuration #23
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Marjori Martinez <[email protected]>
Signed-off-by: Marjori Martinez <[email protected]>
Signed-off-by: Marjori Martinez <[email protected]>
Signed-off-by: Marjori Martinez <[email protected]>
Signed-off-by: Marjori Martinez <[email protected]>
Signed-off-by: Marjori Martinez <[email protected]>
Signed-off-by: Marjori Martinez <[email protected]>
Signed-off-by: Marjori Martinez <[email protected]>
9c2cdd8
to
8fee8e5
Compare
@@ -329,6 +341,23 @@ public static class AuditLoaderConf { | |||
public static final String PROP_SECRET_KEY = "secret_key"; | |||
public String secretKey = ""; | |||
|
|||
public static String PROP_KAFKA_ENABLE = "kafka_enableMSK"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is normal Kafka or Confluent not supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normal Kafka supported.
@@ -392,6 +469,9 @@ public void run() { | |||
AuditEvent event = auditEventQueue.poll(5, TimeUnit.SECONDS); | |||
if (event != null) { | |||
assembleAudit(event); | |||
if (kafkaEnable) { | |||
sendToKafka(event); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it send a message to kafka when each event arrives? Will it cost FE too resource to process events?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, when each audit event arrives it will be send to the kafka queue. It will not generate extra cost because we are only sending messages to the kafka queue, not doing any extra process to it.
@Marjori24 Thank you for your contribution. Could you add the kafka plugin into a sub module in this project.
This will make it easier to maintain You can refer to starrocks/fe to learn how to build multiple modules. |
@gengjun-git hi!
|
|
No description provided.