Skip to content

Conversation

@michaelsauter
Copy link
Contributor

Now both producer emit buffer overflow with a message for consistency.

I investigated some buffer overflow issues on production, and first thought that the issue was to do with the max_buffer_size and max_buffer_bytesize settings. But the error did not include information which limit we had reached. I planned on adding a message to the exception which limit was reached, then realized that the synchronous producer already did this. Only then did I discover the max_queue_size setting and noticed that BufferOverflow was raised without a message if that limit was reached. I found the corresponding error message in the logs, so now I know that this was the problem, but I think it would be good to have both error cases handled in the same way.

Now both producer emit buffer overflow with a message for consistency.
Copy link
Contributor

@dasch dasch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

topic: topic,
})

@logger.error "Cannot produce message to #{topic}, max queue size (#{@max_queue_size}) reached"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to keep the log statement.

Copy link
Contributor Author

@michaelsauter michaelsauter Nov 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it because the sync producer doesn't have it either, and the exception already has the message. If you want exception AND logging, then I suggest we add the logging to the sync producer as well for consistency. Should I do that?

@dasch
Copy link
Contributor

dasch commented Nov 17, 2017 via email

@dasch
Copy link
Contributor

dasch commented Nov 17, 2017

Thanks!

@dasch dasch merged commit 64871cf into zendesk:master Nov 17, 2017
@michaelsauter michaelsauter deleted the feature/async-overflow-message branch November 18, 2017 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants