“Literary modernism (late 19th through mid-20th century, especially around and after WWI) experimented with form in response to industrialization and a rapidly changing world, developing across Europe, the US, and Latin America, not from a single country. 'Stream of consciousness,' associated with James Joyce, tries to render characters' thoughts as they occur rather than reporting actions from outside. James Joyce's Ulysses (1922) and Franz Kafka's The Trial (published posthumously in 1925, Kafka having died in 1924) are landmark works of this period.”
Standard literary history; Kafka's death (1924) and posthumous publication (1925, edited by Max Brod) are well documented.