{"action":"created","issue":{"url":"https://api.github.com/repos/Blizzard/node-rdkafka/issues/68","repository_url":"https://api.github.com/repos/Blizzard/node-rdkafka","labels_url":"https://api.github.com/repos/Blizzard/node-rdkafka/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/Blizzard/node-rdkafka/issues/68/comments","events_url":"https://api.github.com/repos/Blizzard/node-rdkafka/issues/68/events","html_url":"https://github.com/Blizzard/node-rdkafka/issues/68","id":192355825,"number":68,"title":"producer acks property not honored","user":{"login":"edoardocomar","id":6661532,"avatar_url":"https://avatars.githubusercontent.com/u/6661532?v=3","gravatar_id":"","url":"https://api.github.com/users/edoardocomar","html_url":"https://github.com/edoardocomar","followers_url":"https://api.github.com/users/edoardocomar/followers","following_url":"https://api.github.com/users/edoardocomar/following{/other_user}","gists_url":"https://api.github.com/users/edoardocomar/gists{/gist_id}","starred_url":"https://api.github.com/users/edoardocomar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edoardocomar/subscriptions","organizations_url":"https://api.github.com/users/edoardocomar/orgs","repos_url":"https://api.github.com/users/edoardocomar/repos","events_url":"https://api.github.com/users/edoardocomar/events{/privacy}","received_events_url":"https://api.github.com/users/edoardocomar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-11-29T18:04:58Z","updated_at":"2016-12-08T01:17:53Z","closed_at":null,"body":"Even when creating a producer Topic object with code like this \r\n```\r\n        // Create a topic object for the Producer to allow passing topic settings\r\n        var topicOpts = { 'request.required.acks': -1 };\r\n        var topic = producer.Topic(topicName, topicOpts);\r\n        console.log('Topic object created with opts ' + JSON.stringify(topicOpts));\r\n\r\n                producer.once('delivery-report', deliveryReportListener);\r\n\r\n                var value = new Buffer('This is a test message #' + counter);\r\n                var key = 'key';\r\n                counter++;\r\n                var partition = -1;\r\n\r\n                    producer.produce(topic, partition, value, key);\r\n                    // Keep calling poll() to get delivery reports\r\n```\r\nthe produce request over the wire is sending acks=1 (the default).\r\nWe also tried setting the property value as a string` '-1'` or `'all'`. No joy.\r\n\r\nNote that the property set in code is validated, i.e. an Error is thrown if the name or value are unknown. However valid values 0 and -1 are not honored.\r\n\r\nWe could verify this enabling tracing on the broker's kafkaApi \r\nsample log4j conf line:\r\n```\r\nlog4j.logger.kafka.server.KafkaApis=TRACE, requestAppender\r\n```\r\nsample broker log:\r\n```\r\n[2016-11-29 17:53:10,103] TRACE [KafkaApi-0] Handling request:{api_key=0,api_version=1,correlation_id=114,client_id=mh-node-console-sample-producer} -- {acks=1,timeout=5000,topic_data=[{topic=mh-nodejs-console-sample-topic,data=[{partition=0,record_set=java.nio.HeapByteBuffer[pos=0 lim=56 cap=56]}]}]} from connection 192.168.1.67:9092-192.168.1.67:52624;securityProtocol:PLAINTEXT,principal:User:ANONYMOUS (kafka.server.KafkaApis)\r\n```"},"comment":{"url":"https://api.github.com/repos/Blizzard/node-rdkafka/issues/comments/265625069","html_url":"https://github.com/Blizzard/node-rdkafka/issues/68#issuecomment-265625069","issue_url":"https://api.github.com/repos/Blizzard/node-rdkafka/issues/68","id":265625069,"user":{"login":"edoardocomar","id":6661532,"avatar_url":"https://avatars.githubusercontent.com/u/6661532?v=3","gravatar_id":"","url":"https://api.github.com/users/edoardocomar","html_url":"https://github.com/edoardocomar","followers_url":"https://api.github.com/users/edoardocomar/followers","following_url":"https://api.github.com/users/edoardocomar/following{/other_user}","gists_url":"https://api.github.com/users/edoardocomar/gists{/gist_id}","starred_url":"https://api.github.com/users/edoardocomar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edoardocomar/subscriptions","organizations_url":"https://api.github.com/users/edoardocomar/orgs","repos_url":"https://api.github.com/users/edoardocomar/repos","events_url":"https://api.github.com/users/edoardocomar/events{/privacy}","received_events_url":"https://api.github.com/users/edoardocomar/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T01:17:53Z","updated_at":"2016-12-08T01:17:53Z","body":"Yes, the workaround is obvious, I am worried that the side effect of the invocation in the wrong order is quite subtle. \r\n\r\nI also like the idea of \r\n>`getMetadata` to take a topic object instead of an entire topic name.\r\n\r\nbut maybe documenting the side effect of the call is enough ? @webmakersteve \r\n"}}
{"actor":{"display_login":"edoardocomar"}}