I don't understand how it works. What if publish fails and the record will remain unhandled what will resend it? 