Refactor outgoing message processsing to a separate method