Backend Development 6 min read

Hotel Order Transaction System Architecture and Actor Framework Overview

This article presents the event‑driven architecture of a hotel order transaction system, outlines common challenges such as QMQ configuration, exception handling, and coupling, and introduces an Actor‑based solution that provides decoupling, customizable retry, fault‑recovery, and detailed monitoring for over twenty business services.

Qunar Tech Salon
Qunar Tech Salon
Qunar Tech Salon
Hotel Order Transaction System Architecture and Actor Framework Overview

Speaker Yu Xueping, a Java developer who joined Qunar in 2013, currently works on order transaction development within the large‑scale accommodation trading architecture.

The hotel order transaction architecture is fully event‑driven: a unified order‑store service persists changes and emits messages; each business system registers a QMQ listener to receive order change events, enabling more than 20 services to be driven by these events.

Key problems encountered include maintaining QMQ configurations for numerous listeners, handling message exceptions (e.g., frequent EditionConflictException due to optimistic locking), excessive coupling where a single message triggers multiple business logics leading to high retry costs, and fault scenarios where message backlog and retries overwhelm the system.

To address these issues, an Actor framework was created. Each business actor is bound to specific event types rather than raw QMQ messages, allowing independent execution units with their own retry strategies, persistent state, and isolated failure handling.

The framework provides a customizable retry mechanism (actors send delayed QMQ messages on failure without affecting other actors), fault‑recovery support via persisted execution logs (actor‑history.log, actor‑fail.log), and comprehensive monitoring and logging for each actor instance and overall order message processing.

Demo details include Spring configuration, the use of @QActor to register actors with the engine, @Qdiff to bind actors to particular order events, and example code snippets illustrating these annotations.

The presentation is part of Qunar’s internal technical carnival, aimed at sharing architectural insights and fostering cross‑team learning.

backendSystem ArchitectureMessage Queueevent-drivenOrder Managementactor-model
Qunar Tech Salon
Written by

Qunar Tech Salon

Qunar Tech Salon is a learning and exchange platform for Qunar engineers and industry peers. We share cutting-edge technology trends and topics, providing a free platform for mid-to-senior technical professionals to exchange and learn.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.