The content of the invention
Embodiments of the invention provide a kind of payment system message control and processing method, device, to solve prior art
In in the case of independent of container, it is difficult to carry out the control of payment system message and processing the problem of.
To reach above-mentioned purpose, the present invention is adopted the following technical scheme that:
A kind of payment system message control and processing method, including:
Poll reads message from the message-oriented middleware of payment system, obtains pending service message;
Judge whether current thread number is more than the maximum thread threshold value pre-set;
When current thread number is less than the maximum thread threshold value, the pending service message is read, and determines to treat
The type of processing business message;
When the type of pending service message meets the type of message condition pre-set, pending service message is write
Enter to carry out form;
If the write-in of pending service message is come into form does not occur exception, start new thread, treat processing business message and enter
Row processing;
If the write-in of pending service message is come into form exception occurs, and same pending service message write-in carrys out form and gone out
Now abnormal number of times is more than or equal to the frequency of abnormity threshold value pre-set, then pending service message is put into error queue;
If the write-in of pending service message is come into form exception occurs, and same pending service message write-in carrys out form and gone out
Now abnormal number of times is less than the frequency of abnormity threshold value pre-set, then the pending service message write-in is come into form exception occurs
Number of times increase by 1, and pending service message write-in of dishing out carrys out the exception that form occurs, and manufacture transaction rollback causes pending
Service message is returned in the message queue of message-oriented middleware.
Further, the control of described payment system message and processing method, in addition to:
When poll reads message in the message-oriented middleware from payment system, if not pending in the message-oriented middleware
Service message, and in a default pending service message read in not reading message-oriented middleware in duration, then generation failure
Mark.
Specifically, when the type of pending service message meets the type of message condition pre-set, by pending industry
Business message write-in carrys out form, including:
When the type of pending service message is TextMessage Format Types or BytesMessage Format Types,
The write-in of pending service message is carried out into form.
Further, the control of described payment system message and processing method, in addition to:
It is not TextMessage Format Types and BytesMessage Format Types in the type of pending service message
When, by the class record of pending service message in system exception daily record, and the pending service message is deleted.
Specifically, the startup new thread, treats processing business message and is handled, including:
Current thread number is increased into by 1, and the acquisition message traffic number from pending service message;
Business processing strategy corresponding with the message traffic number is obtained according to the message traffic number;
Processing business message is treated according to the business processing strategy to be handled;
The Back ground Information that pending service message is judged after processing business message is handled is being treated with the presence or absence of abnormal;
If the Back ground Information of pending service message has exception, pending service message processing time is recorded future in form
Number is set to 1, and subtracts 1 by current thread number, to terminate the processing for treating processing business message;The Back ground Information includes pending
The message format and Message processing authority of service message;
If exception is not present in the Back ground Information of pending service message, judge to treat the processing return value of processing business message
Whether it is empty;
If it is sky to treat the processing return value of processing business message, expression is treating the data processing of processing business message just
Often, current thread number is subtracted 1, to terminate the processing for treating processing business message;
If the processing return value for treating processing business message is not sky, represent that the data processing for treating processing business message goes out
It is now abnormal, pending service message is put into error queue, current thread number is subtracted 1, to terminate to treat processing business message
Processing.
Handled specifically, treating processing business message according to the business processing strategy, including:
Message-oriented middleware operation is carried out according to pending service message;
If it is normal to carry out message-oriented middleware operation, message-oriented middleware submission is carried out;
If carrying out message-oriented middleware operation abnormal, progress message-oriented middleware rollback occurs, carried without message-oriented middleware
Hand over;
If occurring abnormal, progress message-oriented middleware rollback so that pending business report when carrying out message-oriented middleware submission
Text is returned in the message queue of message-oriented middleware.
Further, processing business message is treated according to the business processing strategy to be handled, in addition to:
System database operation is carried out according to pending service message;
If it is normal to carry out system database operation, system database submission is carried out;
If carrying out system database operation abnormal, progress system database rollback occurs, pending service message is determined
Enter form failure, progress system database operation exception of dishing out carries out message-oriented middleware rollback so that pending service message
In the message queue for returning to message-oriented middleware;
There is abnormal, progress system database rollback if carrying out system database and submitting, determine pending service message
Enter form failure, progress system database operation exception of dishing out carries out message-oriented middleware rollback so that pending service message
In the message queue for returning to message-oriented middleware.
In addition, described payment system message control and processing method, in addition to:
After message traffic number is obtained from pending service message, pending industry is determined according to the message traffic number
Whether business message is processed;
If pending service message is processed, pending service message is deleted.
A kind of payment system message control and processing unit, including:
Poll reading unit, for the poll reading message from the message-oriented middleware of payment system, obtains pending business
Message;
Thread Control Unit, for judging whether current thread number is more than the maximum thread threshold value pre-set;
Type of message determining unit, for when current thread number is less than the maximum thread threshold value, being treated described in reading
Processing business message, and determine the type of pending service message;
Carry out form writing unit, the type of message condition pre-set is met for the type in pending service message
When, the write-in of pending service message is carried out into form;
Pending service message processing unit, for by pending service message write-in come form do not occur abnormal when,
Start new thread, treat processing business message and handled;
Exception processing unit, for the write-in of pending service message to be come into form appearance exception, and same pending industry
When business message write-in carrys out the abnormal number of times of form appearance more than or equal to the frequency of abnormity threshold value pre-set, by pending business report
Text is put into error queue;
Rollback unit, for the write-in of pending service message to be come into form appearance exception, and same pending business report
When text write-in carrys out the abnormal number of times of form appearance less than the frequency of abnormity threshold value pre-set, the pending service message is write
Carry out form and abnormal number of times increase by 1 occur, and the pending service message write-in of dishing out carrys out the exception that form occurs, and manufactures affairs
Rollback causes pending service message to return in the message queue of message-oriented middleware.
Further, the control of described payment system message and processing unit, in addition to:
Failure indication generation unit, for when poll reads message in the message-oriented middleware from payment system, if described
There is no pending service message in message-oriented middleware, and do not read treating in message-oriented middleware in duration in default read and locate
When managing service message, then failure indication is generated.
In addition, it is described come form writing unit, specifically for:
When the type of pending service message is TextMessage Format Types or BytesMessage Format Types,
The write-in of pending service message is carried out into form.
Further, the payment system message control and processing unit, in addition to:
Pending service message deletes unit, is not TextMessage forms for the type in pending service message
When type and BytesMessage Format Types, by the class record of pending service message in system exception daily record, and will
The pending service message is deleted.
Specifically, the pending service message processing unit, including:
Message traffic acquisition module, for current thread number to be increased into 1, and obtains message from pending service message
Service numbers;
Business processing strategy acquisition module, for obtaining corresponding with the message traffic number according to the message traffic number
Business processing strategy;
Pending service message processing module, for being treated according to the business processing strategy at processing business message
Reason;
Back ground Information exception judge module, for judging pending business report after processing business message is handled treating
The Back ground Information of text is with the presence or absence of abnormal;
Back ground Information exception processing module, for when the Back ground Information of pending service message has abnormal, reporting in the future
Pending service message number of processes is recorded in table and is set to 1, and current thread number is subtracted 1, to terminate to treat processing business message
Processing;The Back ground Information includes the message format and Message processing authority of pending service message;
Return value judge module is handled, during for the Back ground Information in pending service message in the absence of exception, judgement pair
Whether the processing return value of pending service message is empty;
The pending service message processing module, it is sky to be additionally operable to treating the processing return value of processing business message
When, represent that the data processing for treating processing business message is normal, current thread number is subtracted 1, to terminate to treat processing business message
Processing;It is not space-time treating the processing return value of processing business message, represents to treat the data processing of processing business message
There is exception, pending service message is put into error queue, current thread number is subtracted 1, to terminate to treat processing business message
Processing.
In addition, the pending service message processing module, specifically for:
Message-oriented middleware operation is carried out according to pending service message;
When progress message-oriented middleware operation is normal, message-oriented middleware submission is carried out;
When carrying out message-oriented middleware operation appearance exception, message-oriented middleware rollback is carried out, is carried without message-oriented middleware
Hand over;
When occurring abnormal when carrying out message-oriented middleware submission, message-oriented middleware rollback is carried out so that pending business report
Text is returned in the message queue of message-oriented middleware.
In addition, the pending service message processing module, is specifically additionally operable to:
System database operation is carried out according to pending service message;
When progress system database operation is normal, system database submission is carried out;
When carrying out system database operation appearance exception, system database rollback is carried out, pending service message is determined
Enter form failure, progress system database operation exception of dishing out carries out message-oriented middleware rollback so that pending service message
In the message queue for returning to message-oriented middleware;
When carrying out system database submission appearance exception, system database rollback is carried out, pending service message is determined
Enter form failure, progress system database operation exception of dishing out carries out message-oriented middleware rollback so that pending service message
In the message queue for returning to message-oriented middleware.
Further, the control of described payment system message and processing unit, in addition to:
Anti- heavy account processing unit, for after message traffic number is obtained from pending service message, according to the report
Literary service numbers determine whether pending service message is processed;When pending service message is processed, it will wait to locate
Service message is managed to delete.
A kind of payment system message control provided in an embodiment of the present invention and processing method, device, first from payment system
Message-oriented middleware in poll read message, obtain pending service message;Judge whether current thread number is more than to pre-set
Maximum thread threshold value;When current thread number is less than the maximum thread threshold value, the pending service message is read,
And determine the type of pending service message;The type of message condition pre-set is met in the type of pending service message
When, the write-in of pending service message is carried out into form;If the write-in of pending service message is come into form does not occur exception, start new line
Journey, treats processing business message and is handled;If the write-in of pending service message is come into form there is exception, and same pending
Service message write-in carrys out form and abnormal number of times occurs more than or equal to the frequency of abnormity threshold value pre-set, then by pending business
Message is put into error queue;If the write-in of pending service message is come into form exception occurs, and same pending service message is write
Enter form and abnormal number of times occur less than the frequency of abnormity threshold value pre-set, then report pending service message write-in
There is abnormal number of times increase by 1 in table, and the pending service message write-in of dishing out carrys out the exception that form occurs, and manufactures transaction rollback
So that pending service message is returned in the message queue of message-oriented middleware.Control and processing of the present invention to payment system message
Different message-oriented middlewares can be read, independent of any specific container, substantial amounts of pending business datum can be handled simultaneously, solve
Multi-user client's end pressure of having determined is concurrent, the concurrent problem of high traffic backstage pressure, it is to avoid in the prior art independent of appearance
In the case of device, it is difficult to carry out the problem of control of payment system message and processing.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
As shown in figure 1, the embodiment of the present invention provides a kind of payment system message control and processing method, including:
Step 101, the poll reading message from the message-oriented middleware of payment system, obtain pending service message.
Step 102, judge whether current thread number is more than the maximum thread threshold value that pre-sets.
Step 103, when current thread number is less than the maximum thread threshold value, read the pending service message,
And determine the type of pending service message.
Step 104, pending service message type meet pre-set type of message condition when, by pending industry
Business message write-in carrys out form.
After step 104, step 105, step 106 or step 107 are performed.
If step 105, the write-in of pending service message is come into form not occurring exception, start new thread, to pending industry
Business message is handled.
If step 106, the write-in of pending service message to be come to form there is abnormal, and same pending service message write-in
Carry out form and abnormal number of times occur more than or equal to the frequency of abnormity threshold value pre-set, then pending service message is put into mistake
Queue.
If step 107, the write-in of pending service message to be come to form there is abnormal, and same pending service message write-in
Carry out form and abnormal number of times occur less than the frequency of abnormity threshold value pre-set, then pending service message write-in is carried out into form
There is abnormal number of times increase by 1, and the pending service message write-in of dishing out carrys out the exception that form occurs, manufacture transaction rollback makes
Pending service message is obtained to return in the message queue of message-oriented middleware.
A kind of payment system message control provided in an embodiment of the present invention and processing method, the first message from payment system
Poll reads message in middleware, obtains pending service message;Judge whether current thread number is more than the maximum pre-set
Thread Count threshold value;When current thread number is less than the maximum thread threshold value, the pending service message is read, and determine
The type of pending service message;When the type of pending service message meets the type of message condition pre-set, it will treat
The write-in of processing business message carrys out form;If the write-in of pending service message is come into form does not occur exception, start new thread, treat
Processing business message is handled;If the write-in of pending service message is come into form there is exception, and same pending business report
Text write-in carrys out form and abnormal number of times occurs more than or equal to the frequency of abnormity threshold value pre-set, then puts pending service message
Enter error queue;If the write-in of pending service message is come into form exception occurs, and same pending service message writes to report
There is abnormal number of times and is less than the frequency of abnormity threshold value pre-set in table, then the pending service message write-in is come into form occurs
Abnormal number of times increase by 1, and the pending service message write-in of dishing out carrys out the exception that form occurs, manufacture transaction rollback to treat
Processing business message is returned in the message queue of message-oriented middleware.Control and processing of the present invention to payment system message can be read
Different message-oriented middlewares, independent of any specific container, substantial amounts of pending business datum can be handled simultaneously, is solved many
Subscription client pressure is concurrent, the concurrent problem of high traffic backstage pressure, it is to avoid in the prior art in the feelings independent of container
Under condition, it is difficult to carry out the problem of control of payment system message and processing.
In order that those skilled in the art is better understood by the present invention, a more detailed embodiment is set forth below,
As shown in Fig. 2 the embodiment of the present invention provides a kind of payment system message control and processing method, including:
Step 201, the poll reading message from the message-oriented middleware of payment system, obtain pending service message.
Herein, when poll reads message in the message-oriented middleware from payment system, if not having in the message-oriented middleware
Pending service message, and in a default pending service message read in not reading message-oriented middleware in duration, then give birth to
Into failure indication (can be expressed as null), wherein presetting a length of jms.receiveTimeout when reading, default value can be
120000, unit is millisecond, i.e., 120 seconds.
In addition, in order to avoid weight account problem, after message traffic number is obtained from pending service message, according to message
Service numbers determine whether pending service message is processed;When pending service message is processed, then it will wait to locate
Service message is managed to delete.
Step 202, judge whether current thread number is more than the maximum thread threshold value that pre-sets.
When current thread number is more than the maximum thread threshold value, step 210 is performed.It is less than in current thread number described
During maximum thread threshold value, step 203 is performed.
Because Thread Count may excessively cause Java Virtual Machine (Java Virtual Machine, abbreviation JVM) generation different
Often, it is therefore desirable to which maximum thread threshold value is set, it is to avoid Thread Count is excessive.
Step 203, read the pending service message, and determine pending service message type whether be
TextMessage Format Types or BytesMessage Format Types.
It is not TextMessage Format Types and BytesMessage Format Types in the type of pending service message
When, perform step 204.It is TextMessage Format Types or BytesMessage forms in the type of pending service message
During type, step 205 is performed.
Due to the message of Java Message Service (Java Message Service, abbreviation JMS) in part between in the message
Type has a lot, and TextMessage Format Types and BytesMessage are only supported in the processing of pending service message herein
Format Type, it is therefore desirable to which the type for treating processing business message is screened.
Step 204, by the class record of pending service message in system exception daily record, and by the pending business
Message is deleted.
Step 205, by pending service message write-in come form, and judge by pending service message write come form be
It is no exception occur.
If the write-in of pending service message is come into form does not occur exception, step 206 is performed.Otherwise, if by pending industry
Business message write-in carrys out form and abnormal, execution step 207 occurs.
Step 206, startup new thread, treat processing business message and are handled.After step 206, step is performed
210。
Step 207, judge same pending service message write-in come form occur abnormal number of times whether be more than or equal to it is pre-
The frequency of abnormity threshold value first set.
If it is secondary more than or equal to the exception pre-set that same pending service message write-in carrys out the abnormal number of times of form appearance
Number threshold value, performs step 208.If same pending service message write-in, which carrys out the abnormal number of times of form appearance, is less than what is pre-set
Frequency of abnormity threshold value, performs step 209.Herein, the frequency of abnormity threshold value pre-set can be 3 times.
Step 208, pending service message is put into error queue.After step 208, step 210 is performed.
Step 209, pending service message write-in is come to form there is abnormal number of times increase by 1, and dish out that this waits to locate
Manage service message write-in and carry out the exception that form occurs, manufacture transaction rollback causes pending service message to return to message-oriented middleware
In message queue.After step 209, step 210 is performed.
Step 210, progress payment system affairs submission, complete the control of payment system message and handle.
In above-mentioned steps 206, start new thread, treating process that processing business message handled can be such as Fig. 3 institute
Show, including:
Step 301, by current thread number increase by 1, and from pending service message obtain message traffic number.
Step 302, corresponding with the message traffic number business processing strategy obtained according to the message traffic number.
Herein, the business processing strategy can be realized in the form of business processing bean, and wherein bean is for retouching
The model of Java software component is stated, is the role of application program material.
Step 303, processing business message is treated according to the business processing strategy handled.
Herein, processing business message treated according to the business processing strategy handled in step 303, including:
Message-oriented middleware operation is carried out according to pending service message.
If it is normal to carry out message-oriented middleware operation, message-oriented middleware submission is carried out.
If carrying out message-oriented middleware operation abnormal, progress message-oriented middleware rollback occurs, carried without message-oriented middleware
Hand over.
If occurring abnormal, progress message-oriented middleware rollback so that pending business report when carrying out message-oriented middleware submission
Text is returned in the message queue of message-oriented middleware.
In addition, treating processing business message according to the business processing strategy and handled in step 303, can also wrap
Include:
System database operation is carried out according to pending service message.
If it is normal to carry out system database operation, system database submission is carried out.
If carrying out system database operation abnormal, progress system database rollback occurs, pending service message is determined
Enter form failure, progress system database operation exception of dishing out carries out message-oriented middleware rollback so that pending service message
In the message queue for returning to message-oriented middleware.
There is abnormal, progress system database rollback if carrying out system database and submitting, determine pending service message
Enter form failure, progress system database operation exception of dishing out carries out message-oriented middleware rollback so that pending service message
In the message queue for returning to message-oriented middleware.
Step 304, treat pending service message is judged after processing business message is handled Back ground Information whether
In the presence of exception.
If there is abnormal, execution step 305 in the Back ground Information of pending service message.Otherwise, if pending service message
Back ground Information be not present abnormal, perform step 306.
Step 305, future record pending service message number of processes and are set to 1 in form, and subtract 1 by current thread number,
To terminate the processing for treating processing business message.
Wherein, the Back ground Information includes the message format and Message processing authority of pending service message.
Whether the processing return value that step 306, judgement treat processing business message is empty.
If it is sky to treat the processing return value of processing business message, expression is treating the data processing of processing business message just
Often, step 307 is performed;If the processing return value for treating processing business message is not sky, represent to treat the number of processing business message
Occurs abnormal, execution step 308 according to processing.
Step 307, current thread number subtracted 1, to terminate the processing for treating processing business message.
Step 308, pending service message is put into error queue, current thread number subtracted 1, to terminate to pending industry
The processing of business message.
A kind of payment system message control provided in an embodiment of the present invention and processing method can have in test environment
The disposal ability of 40,000 pending service messages, can meet various project demands in payment system per hour.The embodiment of the present invention
The payment system message control of offer and processing method can be including running on the Java application servers including tomcat.
A kind of payment system message control provided in an embodiment of the present invention and processing method, the first message from payment system
Poll reads message in middleware, obtains pending service message;Judge whether current thread number is more than the maximum pre-set
Thread Count threshold value;When current thread number is less than the maximum thread threshold value, the pending service message is read, and determine
The type of pending service message;When the type of pending service message meets the type of message condition pre-set, it will treat
The write-in of processing business message carrys out form;If the write-in of pending service message is come into form does not occur exception, start new thread, treat
Processing business message is handled;If the write-in of pending service message is come into form there is exception, and same pending business report
Text write-in carrys out form and abnormal number of times occurs more than or equal to the frequency of abnormity threshold value pre-set, then puts pending service message
Enter error queue;If the write-in of pending service message is come into form exception occurs, and same pending service message writes to report
There is abnormal number of times and is less than the frequency of abnormity threshold value pre-set in table, then the pending service message write-in is come into form occurs
Abnormal number of times increase by 1, and the pending service message write-in of dishing out carrys out the exception that form occurs, manufacture transaction rollback to treat
Processing business message is returned in the message queue of message-oriented middleware.Control and processing of the present invention to payment system message can be read
Different message-oriented middlewares, independent of any specific container, substantial amounts of pending business datum can be handled simultaneously, is solved many
Subscription client pressure is concurrent, the concurrent problem of high traffic backstage pressure, it is to avoid in the prior art in the feelings independent of container
Under condition, it is difficult to carry out the problem of control of payment system message and processing.
Corresponding to the embodiment of the method described in above-mentioned Fig. 1 to Fig. 3, as shown in figure 4, the embodiment of the present invention provides a kind of pay
System message is controlled and processing unit, including:
Poll reading unit 401, for the poll reading message from the message-oriented middleware of payment system, obtains pending industry
Business message.
Thread Control Unit 402, for judging whether current thread number is more than the maximum thread threshold value pre-set.
Type of message determining unit 403, for when current thread number is less than the maximum thread threshold value, reading described
Pending service message, and determine the type of pending service message.
Carry out form writing unit 404, the type of message bar pre-set is met for the type in pending service message
During part, the write-in of pending service message is carried out into form.
Pending service message processing unit 405, for by pending service message write-in come form do not occur exception
When, start new thread, treat processing business message and handled.
Exception processing unit 406, for the write-in of pending service message to be come into form appearance exception, and it is same pending
When service message write-in carrys out the abnormal number of times of form appearance more than or equal to the frequency of abnormity threshold value pre-set, by pending business
Message is put into error queue.
Rollback unit 407, for the write-in of pending service message to be come into form appearance exception, and same pending business
When message write-in carrys out the abnormal number of times of form appearance less than the frequency of abnormity threshold value pre-set, the pending service message is write
Enter form and abnormal number of times increase by 1 occur, and the pending service message write-in of dishing out carrys out the exception that form occurs, and manufactures thing
Business rollback causes pending service message to return in the message queue of message-oriented middleware.
Further, as shown in figure 5, described payment system message is controlled and processing unit, in addition to:
Failure indication generation unit 408, for when poll reads message in the message-oriented middleware from payment system, if institute
Stating in message-oriented middleware does not have pending service message, and does not read treating in message-oriented middleware in duration in default read
During processing business message, then failure indication is generated.
In addition, it is described come form writing unit 404, specifically for:
When the type of pending service message is TextMessage Format Types or BytesMessage Format Types,
The write-in of pending service message is carried out into form.
Further, the payment system message control and processing unit, in addition to:
Pending service message deletes unit 409, is not TextMessage lattice for the type in pending service message
When formula type and BytesMessage Format Types, by the class record of pending service message in system exception daily record, and
The pending service message is deleted.
Specifically, as shown in figure 5, the pending service message processing unit 405, including:
Message traffic acquisition module 451, for current thread number to be increased into 1, and is obtained from pending service message
Message traffic number.
Business processing strategy acquisition module 452, for obtaining right with the message traffic number according to the message traffic number
The business processing strategy answered.
Pending service message processing module 453, enters for treating processing business message according to the business processing strategy
Row processing.
Back ground Information exception judge module 454, for judging pending industry treating after processing business message is handled
The Back ground Information of business message is with the presence or absence of abnormal.
Back ground Information exception processing module 455, during for the Back ground Information in pending service message in the presence of exception, in the future
Pending service message number of processes is recorded in form and is set to 1, and current thread number is subtracted 1, to terminate to treat processing business report
The processing of text;The Back ground Information includes the message format and Message processing authority of pending service message.
Return value judge module 456 is handled, for when the Back ground Information of pending service message is not present abnormal, judging
Whether the processing return value for treating processing business message is empty.
The pending service message processing module 453, be additionally operable to be in the processing return value for treating processing business message
Space-time, represents that the data processing for treating processing business message is normal, subtracts 1 by current thread number, to terminate to treat processing business report
The processing of text;It is not space-time treating the processing return value of processing business message, expression is treated at the data of processing business message
There is exception in reason, and pending service message is put into error queue, subtracts 1 by current thread number, to terminate to treat processing business report
The processing of text.
, specifically can be with addition, the pending service message processing module 453:
Message-oriented middleware operation is carried out according to pending service message.
When progress message-oriented middleware operation is normal, message-oriented middleware submission is carried out.
When carrying out message-oriented middleware operation appearance exception, message-oriented middleware rollback is carried out, is carried without message-oriented middleware
Hand over.
When occurring abnormal when carrying out message-oriented middleware submission, message-oriented middleware rollback is carried out so that pending business report
Text is returned in the message queue of message-oriented middleware.
In addition, the pending service message processing module 453, is specifically additionally operable to:
System database operation is carried out according to pending service message.
When progress system database operation is normal, system database submission is carried out.
When carrying out system database operation appearance exception, system database rollback is carried out, pending service message is determined
Enter form failure, progress system database operation exception of dishing out carries out message-oriented middleware rollback so that pending service message
In the message queue for returning to message-oriented middleware.
When carrying out system database submission appearance exception, system database rollback is carried out, pending service message is determined
Enter form failure, progress system database operation exception of dishing out carries out message-oriented middleware rollback so that pending service message
In the message queue for returning to message-oriented middleware.
Further, as shown in figure 5, described payment system message is controlled and processing unit, in addition to:
Anti- heavy account processing unit 410, for after message traffic number is obtained from pending service message, according to described
Message traffic number determines whether pending service message is processed;When pending service message is processed, it will treat
Processing business message is deleted.
A kind of payment system message control provided in an embodiment of the present invention and processing unit, the first message from payment system
Poll reads message in middleware, obtains pending service message;Judge whether current thread number is more than the maximum pre-set
Thread Count threshold value;When current thread number is less than the maximum thread threshold value, the pending service message is read, and determine
The type of pending service message;When the type of pending service message meets the type of message condition pre-set, it will treat
The write-in of processing business message carrys out form;If the write-in of pending service message is come into form does not occur exception, start new thread, treat
Processing business message is handled;If the write-in of pending service message is come into form there is exception, and same pending business report
Text write-in carrys out form and abnormal number of times occurs more than or equal to the frequency of abnormity threshold value pre-set, then puts pending service message
Enter error queue;If the write-in of pending service message is come into form exception occurs, and same pending service message writes to report
There is abnormal number of times and is less than the frequency of abnormity threshold value pre-set in table, then the pending service message write-in is come into form occurs
Abnormal number of times increase by 1, and the pending service message write-in of dishing out carrys out the exception that form occurs, manufacture transaction rollback to treat
Processing business message is returned in the message queue of message-oriented middleware.Control and processing of the present invention to payment system message can be read
Different message-oriented middlewares, independent of any specific container, substantial amounts of pending business datum can be handled simultaneously, is solved many
Subscription client pressure is concurrent, the concurrent problem of high traffic backstage pressure, it is to avoid in the prior art in the feelings independent of container
Under condition, it is difficult to carry out the problem of control of payment system message and processing.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the present invention can be used in one or more computers for wherein including computer usable program code
The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram are described.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which is produced, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
Apply specific embodiment in the present invention to be set forth the principle and embodiment of the present invention, above example
Explanation be only intended to help to understand the method and its core concept of the present invention;Simultaneously for those of ordinary skill in the art,
According to the thought of the present invention, it will change in specific embodiments and applications, in summary, in this specification
Appearance should not be construed as limiting the invention.