Build a vector of failed messages and retry

Need to check this against nested message sets.
removing comment
rearranging static functions
Adding message_set and batch produce requests