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

Configurable acknowledgement mode for kafka binding #84

Closed
jfallows opened this issue Jun 24, 2022 · 0 comments · Fixed by #93
Closed

Configurable acknowledgement mode for kafka binding #84

jfallows opened this issue Jun 24, 2022 · 0 comments · Fixed by #93
Labels
enhancement New feature or request

Comments

@jfallows
Copy link
Contributor

jfallows commented Jun 24, 2022

In kafka binding client, the producer currently defaults to acks -1 (all = in sync replicas).

Mapping bindings that target kafka for produce, such as http-kafka binding, can be enhanced to configure acks in their with clause when following a route.

{
    "bindings":
    {
        "http_kafka_proxy0":
        {
            "type": "http-kafka",
            "kind": "proxy",
            "routes":
            [
                {
                    "when":
                    [
                        {
                            "path": "/items/{id}"
                        }
                    ],
                    "exit": "kafka_cache_client0",
                    "with":
                    {
                        "capability": "produce",
                        "topic": "items-requests",
                        "key": "${params.id}",
                        "acks": "leader_only",
                        "reply-to": "items-responses"
                    }
                }
            ]
        }
    }
}

This will require changes to KafkaMergedBeginEx and KafkaProduceBeginEx to convey the required acks mode, also internally in the kafka cache_server and cache_client to propagate the acks mode across the cache.

As part of implementing this enhancement, the default acks mode should remain as in_sync_replicas.

@jfallows jfallows added the enhancement New feature or request label Jun 24, 2022
@jfallows jfallows changed the title Support configuration of acknowledgement mode for Kafka client binding Configurable acknowledgement mode for Kafka client binding Jun 24, 2022
@jfallows jfallows changed the title Configurable acknowledgement mode for Kafka client binding Configurable acknowledgement mode for kafka binding Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant