You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/05/10 01:33:25 UTC

[GitHub] [camel] zhfeng opened a new pull request, #7577: Add doc for kafka transaction

zhfeng opened a new pull request, #7577:
URL: https://github.com/apache/camel/pull/7577

   <!-- Uncomment and fill this section if your PR is not trivial
   - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
   - [ ] Each commit in the pull request should have a meaningful subject line and body.
   - [ ] If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
   - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [ ] Run `mvn clean install -Psourcecheck` in your module with source check enabled to make sure basic checks pass and there are no checkstyle violations. A more thorough check will be performed on your pull request automatically.
   Below are the contribution guidelines:
   https://github.com/apache/camel/blob/main/CONTRIBUTING.md
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] zhfeng merged pull request #7577: Add doc for kafka transaction

Posted by GitBox <gi...@apache.org>.
zhfeng merged PR #7577:
URL: https://github.com/apache/camel/pull/7577


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #7577: Add doc for kafka transaction

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7577:
URL: https://github.com/apache/camel/pull/7577#issuecomment-1121817835

   :heavy_check_mark: Finished component verification: 0 component(s) test failed out of **1 component(s) tested**


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] zhfeng commented on pull request #7577: Add doc for kafka transaction

Posted by GitBox <gi...@apache.org>.
zhfeng commented on PR #7577:
URL: https://github.com/apache/camel/pull/7577#issuecomment-1122048783

   Thanks @davsclaus 
   
   - `transactional.id`->`addtional-properties[transactional.id]`
   - `idempotence`->`additional-properties[enable.idempotence]`
   - `retries`->`additional-properties[retries]`
   
   Does it make sense?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #7577: Add doc for kafka transaction

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7577:
URL: https://github.com/apache/camel/pull/7577#issuecomment-1121771931

   :warning: This PR changes Camel components and will be tested automatically.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] davsclaus commented on pull request #7577: Add doc for kafka transaction

Posted by GitBox <gi...@apache.org>.
davsclaus commented on PR #7577:
URL: https://github.com/apache/camel/pull/7577#issuecomment-1122119083

   Yeah but name it transactionId without the dot in the uri option


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] zhfeng commented on a diff in pull request #7577: Add doc for kafka transaction

Posted by GitBox <gi...@apache.org>.
zhfeng commented on code in PR #7577:
URL: https://github.com/apache/camel/pull/7577#discussion_r868889928


##########
components/camel-kafka/src/main/docs/kafka-component.adoc:
##########
@@ -423,5 +423,16 @@ from("kafka:my_topic?headerFilterStrategy=#myStrategy")
 
 `myStrategy` object should be subclass of `HeaderFilterStrategy` and must be placed in the Camel registry, either manually or by registration as a bean in Spring/Blueprint, as it is `CamelContext` aware.
 
+== Kafka Transaction
+
+It needs to add `transactional.id`, `enable.idempotence` and `retries` in `additional-properties` to enable kafka transaction with the producer.
+[source,java]
+----
+from("direct:transaction")
+.to("kafka:my_topic?additional-properties[transactional.id]=1234additional-properties[enable.idempotence]=trueadditional-properties[retries]=5");

Review Comment:
   Done



##########
components/camel-kafka/src/main/docs/kafka-component.adoc:
##########
@@ -423,5 +423,16 @@ from("kafka:my_topic?headerFilterStrategy=#myStrategy")
 
 `myStrategy` object should be subclass of `HeaderFilterStrategy` and must be placed in the Camel registry, either manually or by registration as a bean in Spring/Blueprint, as it is `CamelContext` aware.
 
+== Kafka Transaction
+
+It needs to add `transactional.id`, `enable.idempotence` and `retries` in `additional-properties` to enable kafka transaction with the producer.

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] davsclaus commented on pull request #7577: Add doc for kafka transaction

Posted by GitBox <gi...@apache.org>.
davsclaus commented on PR #7577:
URL: https://github.com/apache/camel/pull/7577#issuecomment-1122018831

   I think it would be good if we could make configuring the TX options as new endpoint options so its easier and more tooling friendly. Additional properties is only intended for special and rare use-cases.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] davsclaus commented on a diff in pull request #7577: Add doc for kafka transaction

Posted by GitBox <gi...@apache.org>.
davsclaus commented on code in PR #7577:
URL: https://github.com/apache/camel/pull/7577#discussion_r868805302


##########
components/camel-kafka/src/main/docs/kafka-component.adoc:
##########
@@ -423,5 +423,16 @@ from("kafka:my_topic?headerFilterStrategy=#myStrategy")
 
 `myStrategy` object should be subclass of `HeaderFilterStrategy` and must be placed in the Camel registry, either manually or by registration as a bean in Spring/Blueprint, as it is `CamelContext` aware.
 
+== Kafka Transaction
+
+It needs to add `transactional.id`, `enable.idempotence` and `retries` in `additional-properties` to enable kafka transaction with the producer.
+[source,java]
+----
+from("direct:transaction")
+.to("kafka:my_topic?additional-properties[transactional.id]=1234additional-properties[enable.idempotence]=trueadditional-properties[retries]=5");

Review Comment:
   You need & to separate the options



##########
components/camel-kafka/src/main/docs/kafka-component.adoc:
##########
@@ -423,5 +423,16 @@ from("kafka:my_topic?headerFilterStrategy=#myStrategy")
 
 `myStrategy` object should be subclass of `HeaderFilterStrategy` and must be placed in the Camel registry, either manually or by registration as a bean in Spring/Blueprint, as it is `CamelContext` aware.
 
+== Kafka Transaction
+
+It needs to add `transactional.id`, `enable.idempotence` and `retries` in `additional-properties` to enable kafka transaction with the producer.

Review Comment:
   It needs -> You need



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #7577: Add doc for kafka transaction

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #7577:
URL: https://github.com/apache/camel/pull/7577#issuecomment-1122047670

   :heavy_check_mark: Finished component verification: 0 component(s) test failed out of **1 component(s) tested**


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org