{"action":"created","issue":{"url":"https://api.github.com/repos/edenhill/librdkafka/issues/488","labels_url":"https://api.github.com/repos/edenhill/librdkafka/issues/488/labels{/name}","comments_url":"https://api.github.com/repos/edenhill/librdkafka/issues/488/comments","events_url":"https://api.github.com/repos/edenhill/librdkafka/issues/488/events","html_url":"https://github.com/edenhill/librdkafka/issues/488","id":124478117,"number":488,"title":"Large message fails the following messages as well?","user":{"login":"ozac","id":16306656,"avatar_url":"https://avatars.githubusercontent.com/u/16306656?v=3","gravatar_id":"","url":"https://api.github.com/users/ozac","html_url":"https://github.com/ozac","followers_url":"https://api.github.com/users/ozac/followers","following_url":"https://api.github.com/users/ozac/following{/other_user}","gists_url":"https://api.github.com/users/ozac/gists{/gist_id}","starred_url":"https://api.github.com/users/ozac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozac/subscriptions","organizations_url":"https://api.github.com/users/ozac/orgs","repos_url":"https://api.github.com/users/ozac/repos","events_url":"https://api.github.com/users/ozac/events{/privacy}","received_events_url":"https://api.github.com/users/ozac/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/edenhill/librdkafka/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-31T14:59:46Z","updated_at":"2016-01-02T09:03:42Z","closed_at":null,"body":"I'm testing a scenario where a message too large is sent:\r\n\r\nI configured Kafka broker with a maximum message size of 2,000 bytes (`message.max.bytes=2000`).\r\nI produce a message larger than 2,000 bytes, immediately followed by smaller messages.\r\nResults: **all** messages failed with error **\"Broker: Message size too large\"**.\r\n\r\nI then added a delay between message producing.\r\nThis worked fine: the too large message failed, other messages succeeded.\r\n\r\nIs this the expected behavior? \r\n\r\nThanks\r\n"},"comment":{"url":"https://api.github.com/repos/edenhill/librdkafka/issues/comments/168374228","html_url":"https://github.com/edenhill/librdkafka/issues/488#issuecomment-168374228","issue_url":"https://api.github.com/repos/edenhill/librdkafka/issues/488","id":168374228,"user":{"login":"edenhill","id":524990,"avatar_url":"https://avatars.githubusercontent.com/u/524990?v=3","gravatar_id":"","url":"https://api.github.com/users/edenhill","html_url":"https://github.com/edenhill","followers_url":"https://api.github.com/users/edenhill/followers","following_url":"https://api.github.com/users/edenhill/following{/other_user}","gists_url":"https://api.github.com/users/edenhill/gists{/gist_id}","starred_url":"https://api.github.com/users/edenhill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edenhill/subscriptions","organizations_url":"https://api.github.com/users/edenhill/orgs","repos_url":"https://api.github.com/users/edenhill/repos","events_url":"https://api.github.com/users/edenhill/events{/privacy}","received_events_url":"https://api.github.com/users/edenhill/received_events","type":"User","site_admin":false},"created_at":"2016-01-02T09:03:42Z","updated_at":"2016-01-02T09:03:42Z","body":"Messages are batched together in the producer before being sent to the broker, so in this case the batch probably contains first the large message and then the small. But the entire batch is too big for the broker so it throws them both away and thus both messages fail.\r\n\r\nAdding a delay will put the messages in two different batches. (`queue.buffering.max.ms`)"}}