  Microservices emerged as a popular architectural style over the last decade.
Although microservices are designed to be self-contained, they must communicate
to realize business capabilities, creating dependencies among their data and
functionalities. Developers then resort to asynchronous, event-based
communication to fulfill such dependencies while reducing coupling. However,
developers are often oblivious to the inherent challenges of the asynchronous
and event-based paradigm, leading to frustrations and ultimately making them
reconsider the adoption of microservices. To make matters worse, there is a
scarcity of literature on the practices and challenges of designing,
implementing, testing, monitoring, and troubleshooting event-based
microservices.
  To fill this gap, this paper provides the first comprehensive
characterization of event management practices and challenges in microservices
based on a repository mining study of over 8000 Stack Overflow questions.
Moreover, 628 relevant questions were randomly sampled for an in-depth manual
investigation of challenges. We find that developers encounter many problems,
including large event payloads, modeling event schemas, auditing event flows,
and ordering constraints in processing events. This suggests that developers
are not sufficiently served by state-of-the-practice technologies. We provide
actionable implications to developers, technology providers, and researchers to
advance event management in microservices.
