{"action":"created","issue":{"url":"https://api.github.com/repos/kafkaex/kafka_ex/issues/26","labels_url":"https://api.github.com/repos/kafkaex/kafka_ex/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/kafkaex/kafka_ex/issues/26/comments","events_url":"https://api.github.com/repos/kafkaex/kafka_ex/issues/26/events","html_url":"https://github.com/kafkaex/kafka_ex/issues/26","id":91382019,"number":26,"title":"Exception raised when producing","user":{"login":"fbjork","id":4585,"avatar_url":"https://avatars.githubusercontent.com/u/4585?v=3","gravatar_id":"","url":"https://api.github.com/users/fbjork","html_url":"https://github.com/fbjork","followers_url":"https://api.github.com/users/fbjork/followers","following_url":"https://api.github.com/users/fbjork/following{/other_user}","gists_url":"https://api.github.com/users/fbjork/gists{/gist_id}","starred_url":"https://api.github.com/users/fbjork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbjork/subscriptions","organizations_url":"https://api.github.com/users/fbjork/orgs","repos_url":"https://api.github.com/users/fbjork/repos","events_url":"https://api.github.com/users/fbjork/events{/privacy}","received_events_url":"https://api.github.com/users/fbjork/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-06-26T23:04:20Z","updated_at":"2015-09-21T23:04:51Z","closed_at":null,"body":"Hi,\r\n\r\nI'm using kafka_ex 0.0.2 in a Phoenix app and I get an exception when I try to produce a message:\r\n\r\nHere's the output:\r\n\r\n```\r\niex(1)> KafkaEx.create_worker(:feeds)\r\n{:ok, #PID<0.299.0>}\r\n\r\niex(3)> KafkaEx.produce(\"feeds\", 0, \"hello\")\r\n** (exit) exited in: GenServer.call(KafkaEx.Server, {:produce, \"feeds\", 0, \"hello\", nil, 0, 100}, 5000)\r\n    ** (EXIT) an exception was raised:\r\n        ** (FunctionClauseError) no function clause matching in :gen_tcp.send/2\r\n            (kernel) gen_tcp.erl:261: :gen_tcp.send(nil, <<0, 0, 0, 0, 0, 0, 0, 1, 0, 8, 107, 97, 102, 107, 97, 95, 101, 120, 0, 0, 0, 0, 0, 100, 0, 0, 0, 1, 0, 5, 102, 101, 101, 100, 115, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, ...>>)\r\n            (kafka_ex) lib/kafka_ex/server.ex:126: KafkaEx.Server.send_data/2\r\n            (kafka_ex) lib/kafka_ex/server.ex:21: KafkaEx.Server.handle_call/3\r\n            (stdlib) gen_server.erl:607: :gen_server.try_handle_call/4\r\n            (stdlib) gen_server.erl:639: :gen_server.handle_msg/5\r\n            (stdlib) proc_lib.erl:237: :proc_lib.init_p_do_apply/3\r\n    (elixir) lib/gen_server.ex:356: GenServer.call/3\r\n[error] GenServer KafkaEx.Server terminating\r\nLast message: {:produce, \"feeds\", 0, \"hello\", nil, 0, 100}\r\nState: {1, %{brokers: %{0 => {\"10.1.4.131\", 9092}}, topics: %{\"feeds\" => %{error_code: 0, partitions: %{0 => %{error_code: 0, isrs: [0], leader: 0, replicas: [0]}}}}}, %{{\"localhost\", 9092} => #Port<0.5877>}, nil}\r\n** (exit) an exception was raised:\r\n    ** (FunctionClauseError) no function clause matching in :gen_tcp.send/2\r\n        (kernel) gen_tcp.erl:261: :gen_tcp.send(nil, <<0, 0, 0, 0, 0, 0, 0, 1, 0, 8, 107, 97, 102, 107, 97, 95, 101, 120, 0, 0, 0, 0, 0, 100, 0, 0, 0, 1, 0, 5, 102, 101, 101, 100, 115, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, ...>>)\r\n        (kafka_ex) lib/kafka_ex/server.ex:126: KafkaEx.Server.send_data/2\r\n        (kafka_ex) lib/kafka_ex/server.ex:21: KafkaEx.Server.handle_call/3\r\n        (stdlib) gen_server.erl:607: :gen_server.try_handle_call/4\r\n        (stdlib) gen_server.erl:639: :gen_server.handle_msg/5\r\n        (stdlib) proc_lib.erl:237: :proc_lib.init_p_do_apply/3\r\n```\r\n\r\nAny idea what's wrong?"},"comment":{"url":"https://api.github.com/repos/kafkaex/kafka_ex/issues/comments/142133540","html_url":"https://github.com/kafkaex/kafka_ex/issues/26#issuecomment-142133540","issue_url":"https://api.github.com/repos/kafkaex/kafka_ex/issues/26","id":142133540,"user":{"login":"bjhaid","id":593852,"avatar_url":"https://avatars.githubusercontent.com/u/593852?v=3","gravatar_id":"","url":"https://api.github.com/users/bjhaid","html_url":"https://github.com/bjhaid","followers_url":"https://api.github.com/users/bjhaid/followers","following_url":"https://api.github.com/users/bjhaid/following{/other_user}","gists_url":"https://api.github.com/users/bjhaid/gists{/gist_id}","starred_url":"https://api.github.com/users/bjhaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjhaid/subscriptions","organizations_url":"https://api.github.com/users/bjhaid/orgs","repos_url":"https://api.github.com/users/bjhaid/repos","events_url":"https://api.github.com/users/bjhaid/events{/privacy}","received_events_url":"https://api.github.com/users/bjhaid/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T23:04:51Z","updated_at":"2015-09-21T23:04:51Z","body":"closed with https://github.com/kafkaex/kafka_ex/releases/tag/0.2.0 published https://hex.pm/packages/kafka_ex/0.2.0"}}