def METHOD_NAME(self):
    event = self.receive_message()
    if self.format_filename:
        ev = defaultdict(None)
        ev.update(event)
        # remove once #671 is done
        if 'time.observation' in ev:
            try:
                ev['time.observation'] = datetime.datetime.strptime(ev['time.observation'],
                                                                    '%Y-%m-%dT%H:%M:%S+00:00')
            except ValueError:
                ev['time.observation'] = datetime.datetime.strptime(ev['time.observation'],
                                                                    '%Y-%m-%dT%H:%M:%S.%f+00:00')
        if 'time.source' in ev:
            try:
                ev['time.source'] = datetime.datetime.strptime(ev['time.source'],
                                                               '%Y-%m-%dT%H:%M:%S+00:00')
            except ValueError:
                ev['time.source'] = datetime.datetime.strptime(ev['time.source'],
                                                               '%Y-%m-%dT%H:%M:%S.%f+00:00')
        filename = self.file.format(event=ev)
        if not self._file or filename != self._file.name:
            self.open_file(filename)
    event_data = self.export_event(event, return_type=str)
    try:
        self._file.write(event_data)
        self._file.write("\n")
        self._file.flush()
    except FileNotFoundError:
        self.init()
    else:
        self.acknowledge_message()