The invention discloses a
queue-based service request
asynchronous processing method and device, and the method comprises the steps: obtaining a service request received by a foreground
server, and packaging the service request and
processing information corresponding to the service request into a message according to a preset packaging format; performing
delay processing on the message accordingto a preset
delay mechanism, and storing the delayed message into cache
middleware; periodically reading expired messages in the cache
middleware; and selecting a corresponding
message queue accordingto the service type of the service request, sending the read message to a corresponding background
server for
asynchronous processing, and returning response information to the foreground
server. According to the method and the device, during
asynchronous processing of the service, response is returned firstly, and then post-
processing are carried out on the service, so that the
response time ofthe service is shortened, meanwhile, overtime abnormity of the
system is avoided, messages of different levels pass through different queues, unimportant services are prevented from influencing important services, the performance and the reliability of the
system are improved, and meanwhile, the complexity of the
system is reduced.