The invention provides a message sorting method and device,
electronic equipment and a program product, original messages are obtained through a distribution
thread pool, the messages of the same
business process are distributed to the same to-be-sorted
queue, a working thread of the sorting
thread pool reads the messages and stores the messages in a thread local cache set, the sendability is judged based on the dependency relationship of the messages in the
business process, and the message sorting efficiency is improved. The messages meeting the conditions are sent to the subscription
queue, and the messages not meeting the conditions are reserved in the cache. According to the mechanism, the problem of disorder of messages of the same service caused by multiple switches and
network delay of message
middleware is effectively solved, and data inconsistency and service abnormity are avoided; unified sorting logic replaces repeated development of subscribers, so that the
system complexity is reduced; through
thread pool division, local cache storage and a cache strategy of messages which do not meet conditions, the interaction overhead is reduced, the message orderliness and
low delay requirements are considered in a high-frequency transaction scene, and the
processing throughput, the real-time performance and the
resource utilization rate under high
concurrency are improved.