|
@@ -59,26 +59,26 @@ public class Consumer {
|
59
|
59
|
} else {
|
60
|
60
|
tolot++;
|
61
|
61
|
int finalTolot = tolot;
|
62
|
|
- Object mge = redisQueueService.receiveMessage(Constant.SERVER);
|
63
|
|
- try {
|
64
|
|
- System.out.println("消费消息------------:第(" + finalTolot + ")条");
|
65
|
|
- JSONObject jsonObject = (JSONObject) JSON.toJSON(mge);
|
66
|
|
- monitorBusiness.inboundOperations(jsonObject);
|
67
|
|
- } catch (Exception e) {
|
68
|
|
- redisQueueService.sendMessage(Constant.RECEIVEREPEAT, mge);
|
69
|
|
- Thread.currentThread().interrupt();
|
70
|
|
- }
|
71
|
|
-// executor.submit(() -> {
|
72
|
|
-// Object mge = redisQueueService.receiveMessage(Constant.SERVER);
|
73
|
|
-// try {
|
74
|
|
-// System.out.println("消费消息------------:第(" + finalTolot + ")条");
|
75
|
|
-// JSONObject jsonObject = (JSONObject) JSON.toJSON(mge);
|
76
|
|
-// monitorBusiness.inboundOperations(jsonObject);
|
77
|
|
-// } catch (Exception e) {
|
78
|
|
-// redisQueueService.sendMessage(Constant.RECEIVEREPEAT, mge);
|
79
|
|
-// Thread.currentThread().interrupt();
|
80
|
|
-// }
|
81
|
|
-// });
|
|
62
|
+// Object mge = redisQueueService.receiveMessage(Constant.SERVER);
|
|
63
|
+// try {
|
|
64
|
+// System.out.println("消费消息------------:第(" + finalTolot + ")条");
|
|
65
|
+// JSONObject jsonObject = (JSONObject) JSON.toJSON(mge);
|
|
66
|
+// monitorBusiness.inboundOperations(jsonObject);
|
|
67
|
+// } catch (Exception e) {
|
|
68
|
+// redisQueueService.sendMessage(Constant.RECEIVEREPEAT, mge);
|
|
69
|
+// Thread.currentThread().interrupt();
|
|
70
|
+// }
|
|
71
|
+ executor.submit(() -> {
|
|
72
|
+ Object mge = redisQueueService.receiveMessage(Constant.SERVER);
|
|
73
|
+ try {
|
|
74
|
+ System.out.println("消费消息------------:第(" + finalTolot + ")条");
|
|
75
|
+ JSONObject jsonObject = (JSONObject) JSON.toJSON(mge);
|
|
76
|
+ monitorBusiness.inboundOperations(jsonObject);
|
|
77
|
+ } catch (Exception e) {
|
|
78
|
+ redisQueueService.sendMessage(Constant.RECEIVEREPEAT, mge);
|
|
79
|
+ Thread.currentThread().interrupt();
|
|
80
|
+ }
|
|
81
|
+ });
|
82
|
82
|
}
|
83
|
83
|
}
|
84
|
84
|
|