Added an exception handler for when events fail to publish during container shutdown

...ner shutdown