The short answer
Wallace found the same mechanism independently, in 1858. Darwin had it in 1838 and had written it out in full by 1844. Neither man published first on his own: their work was read together.
The parcel from Ternate
Wallace was a professional collector in the Malay archipelago. His essay is dated Ternate, February, 1858. Darwin wrote to Lyell on 18 June that he had received it, and that it set out his own theory.
Lyell and Joseph Hooker arranged for Wallace's essay, an extract from Darwin's 1844 essay and a summary of a letter Darwin had written to the American botanist Asa Gray to be read at the Linnean Society on 1 July 1858. Wallace's essay does not use the phrase natural selection.
The dispute
Whether the parcel could have reached Darwin earlier than 18 June, in time for him to use it before writing to Lyell, has been argued since the 1970s on the strength of the mail-steamer timetables. The only fixed point is 18 June, because Darwin wrote it down.
What Wallace thought
It was Wallace who later urged Darwin to adopt Spencer's survival of the fittest. The two corresponded for years afterwards, and disagreed, at length, about sexual selection.