Skip to content
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

Need transaction support to group batch of records in message publisher - ReactiveMessaging/KafkaConnector #3896

Open
santhoshpt opened this issue Feb 15, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request messaging Reactive Messaging P3

Comments

@santhoshpt
Copy link

Environment Details

  • Helidon Version: 2.4.2
  • Helidon MP
  • JDK version: 11.0.13
  • OS: Windows 10
  • Docker version (if applicable):

Problem Description

  • "In Helidon Message, we don't have the transaction support to batch bunch of messages for publishing. So that the consumer can read with read_comitted isolation level"
  • "As a producer I need to batch bunch of messages are single transaction, in apache-kafka it can be done using commitTransaction()"

Sample code of apache kafka client

KafkaProducer<String, String> producer = new KafkaProducer<>(configProps);
producer.initTransactions();
producer.beginTransaction();
ProducerRecord<String, String> record;
try {
	long timeInMillies = System.currentTimeMillis();
	for (int i = 1; i <= 10; i++) {
		record = new ProducerRecord<>(topic, "Hai_" + timeInMillies + "_" + i);
		producer.send(record);
		log.info("Sending the message --> " + record.value());
		Thread.sleep(1000);
	}
	log.info("Commiting the transaction");
	producer.commitTransaction();
} catch (KafkaException kafkaExec) {
	producer.abortTransaction();
	kafkaExec.printStackTrace();
}
producer.close();
@santhoshpt santhoshpt changed the title Need transaction grouping for batch of records in KafkaProcuder Need transaction support to group batch of records in message publisher - ReactiveMessaging/KafkaConnector Feb 15, 2022
@m0mus m0mus added messaging Reactive Messaging enhancement New feature or request P3 labels Feb 17, 2022
@m0mus m0mus added this to Backlog Aug 12, 2024
@m0mus m0mus moved this to Normal priority in Backlog Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request messaging Reactive Messaging P3
Projects
Status: Normal priority
Development

No branches or pull requests

3 participants