{"action":"opened","issue":{"url":"https://api.github.com/repos/spicavigo/kafka-rust/issues/12","labels_url":"https://api.github.com/repos/spicavigo/kafka-rust/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/spicavigo/kafka-rust/issues/12/comments","events_url":"https://api.github.com/repos/spicavigo/kafka-rust/issues/12/events","html_url":"https://github.com/spicavigo/kafka-rust/issues/12","id":101284901,"number":12,"title":"KafkaClient.send_messages() only sends the last message","user":{"login":"jedisct1","id":124872,"avatar_url":"https://avatars.githubusercontent.com/u/124872?v=3","gravatar_id":"","url":"https://api.github.com/users/jedisct1","html_url":"https://github.com/jedisct1","followers_url":"https://api.github.com/users/jedisct1/followers","following_url":"https://api.github.com/users/jedisct1/following{/other_user}","gists_url":"https://api.github.com/users/jedisct1/gists{/gist_id}","starred_url":"https://api.github.com/users/jedisct1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedisct1/subscriptions","organizations_url":"https://api.github.com/users/jedisct1/orgs","repos_url":"https://api.github.com/users/jedisct1/repos","events_url":"https://api.github.com/users/jedisct1/events{/privacy}","received_events_url":"https://api.github.com/users/jedisct1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-16T17:58:32Z","updated_at":"2015-08-16T17:58:32Z","closed_at":null,"body":"Hi,\r\n\r\nLooks like `KafkaClient.send_messages()` only sends one message (always the last one) no matter what the size of the messages vector is.\r\n\r\nEven the sample code:\r\n\r\n```rust\r\n    let m1 = \"a\".to_string().into_bytes();\r\n    let m2 = \"b\".to_string().into_bytes();\r\n    let req = vec!(utils::ProduceMessage{topic: \"my-topic\".to_string(), message: m1},\r\n                    utils::ProduceMessage{topic: \"my-topic-2\".to_string(), message: m2});\r\n    client.send_messages(1, 100, req);  // required acks, timeout, messages\r\n```\r\n\r\nActually only writes `m2`. Consumers only get `b`, and the offset is only increased by 1."}}