{"action":"created","issue":{"url":"https://api.github.com/repos/arnaud-lb/php-rdkafka/issues/198","repository_url":"https://api.github.com/repos/arnaud-lb/php-rdkafka","labels_url":"https://api.github.com/repos/arnaud-lb/php-rdkafka/issues/198/labels{/name}","comments_url":"https://api.github.com/repos/arnaud-lb/php-rdkafka/issues/198/comments","events_url":"https://api.github.com/repos/arnaud-lb/php-rdkafka/issues/198/events","html_url":"https://github.com/arnaud-lb/php-rdkafka/issues/198","id":394852169,"node_id":"MDU6SXNzdWUzOTQ4NTIxNjk=","number":198,"title":"How use consumer properties about security sasl SASL_PLAINTEXT","user":{"login":"fighthorse","id":15966615,"node_id":"MDQ6VXNlcjE1OTY2NjE1","avatar_url":"https://avatars1.githubusercontent.com/u/15966615?v=4","gravatar_id":"","url":"https://api.github.com/users/fighthorse","html_url":"https://github.com/fighthorse","followers_url":"https://api.github.com/users/fighthorse/followers","following_url":"https://api.github.com/users/fighthorse/following{/other_user}","gists_url":"https://api.github.com/users/fighthorse/gists{/gist_id}","starred_url":"https://api.github.com/users/fighthorse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fighthorse/subscriptions","organizations_url":"https://api.github.com/users/fighthorse/orgs","repos_url":"https://api.github.com/users/fighthorse/repos","events_url":"https://api.github.com/users/fighthorse/events{/privacy}","received_events_url":"https://api.github.com/users/fighthorse/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-30T07:13:05Z","updated_at":"2018-12-30T07:15:05Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nThank you for creating a ticket!\r\n\r\nBefore submitting the ticket, please consider asking a question on the\r\nGitter channel at https://gitter.im/arnaud-lb/php-rdkafka, or\r\non the Google Groups at https://groups.google.com/forum/#!forum/php-rdkafka\r\n\r\nIf you are reporting a bug, please provide the following informations:\r\n-->\r\n\r\n * PHP version: 7.1.12\r\n * librdkafka version: 0.9\r\n * php-rdkfaka version: 3.0\r\n\r\nlike C++ use kafka ：\r\n\r\nrd_kafka_conf_set(conf_, \"bootstrap.servers\", brokers.c_str(), errstr,sizeof(errstr));\r\nrd_kafka_conf_set(conf_, \"security.protocol\", \"sasl_plaintext\", errstr,sizeof(errstr));\r\nrd_kafka_conf_set(conf_, \"sasl.mechanisms\", \"PLAIN\", errstr, sizeof(errstr));\r\nrd_kafka_conf_set(conf_, \"sasl.username\", username.c_str(), errstr, sizeof(errstr));\r\nrd_kafka_conf_set(conf_, \"sasl.password\", password.c_str(), errstr,sizeof(errstr));\r\nrd_kafka_conf_set(conf_, \"api.version.request\", \"true\", errstr,sizeof(errstr));\r\n \r\n \r\n1、首先通过rd_kafka_conf_new()函数创建rd_kafka_conf_t对象\r\n2、设置rd_kafka_conf_t对象，设置kafka客户端参数,示例参数为：\r\nbootstrap.servers: broker地址列表\r\nsecurity.protocol: 安全协议类型，示例为SASL_PLAINTEXT\r\nsasl.mechanisms: sasl协议机制，示例为PLAIN, 表示普通文本\r\nsasl.username: 认证用户名\r\nsasl.password: 认证密码\r\napi.version.request: 可选，librdkafka与kafka服务器版本适配参数，该参数为true表示允许librdkafka向broker发送请求询问broker支持的API版本列表(Apache Kafka v0.10.0版本后支持),\r\n\r\n以完成版本适配，更多版本适配要点见https://github.com/edenhill/librdkafka/wiki/Broker-version-compatibility\r\n\r\n\r\nphp-rdkafka can use this ？？\r\n\r\nfor help~"},"comment":{"url":"https://api.github.com/repos/arnaud-lb/php-rdkafka/issues/comments/450543607","html_url":"https://github.com/arnaud-lb/php-rdkafka/issues/198#issuecomment-450543607","issue_url":"https://api.github.com/repos/arnaud-lb/php-rdkafka/issues/198","id":450543607,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDU0MzYwNw==","user":{"login":"fighthorse","id":15966615,"node_id":"MDQ6VXNlcjE1OTY2NjE1","avatar_url":"https://avatars1.githubusercontent.com/u/15966615?v=4","gravatar_id":"","url":"https://api.github.com/users/fighthorse","html_url":"https://github.com/fighthorse","followers_url":"https://api.github.com/users/fighthorse/followers","following_url":"https://api.github.com/users/fighthorse/following{/other_user}","gists_url":"https://api.github.com/users/fighthorse/gists{/gist_id}","starred_url":"https://api.github.com/users/fighthorse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fighthorse/subscriptions","organizations_url":"https://api.github.com/users/fighthorse/orgs","repos_url":"https://api.github.com/users/fighthorse/repos","events_url":"https://api.github.com/users/fighthorse/events{/privacy}","received_events_url":"https://api.github.com/users/fighthorse/received_events","type":"User","site_admin":false},"created_at":"2018-12-30T07:15:05Z","updated_at":"2018-12-30T07:15:05Z","author_association":"NONE","body":"##################consumer.properties\r\nsecurity.protocol=SASL_PLAINTEXT\r\nsasl.mechanism=PLAIN\r\n##############kafka_client_consumer_jass \r\nKafkaClient {\r\n  org.apache.kafka.common.security.plain.PlainLoginModule required\r\n  username=\"writer\"\r\n  password=\"writer\";\r\n};"}}
{"actor":{"display_login":"fighthorse"}}