| 17 | static const char* RESULT_TOPIC_NAME = "example/result/topic"; |
| 18 | |
| 19 | int randomSleep(int start, int range) { |
| 20 | // 随机休息一下,模拟处理的耗时 |
| 21 | int ms = std::abs((int)std::random_device{}()) % range + start; |
| 22 | CGRAPH_SLEEP_MILLISECOND(ms); |
| 23 | return ms; |
| 24 | } |
| 25 | |
| 26 | struct InputMParam : public GMessageParam { |
| 27 | int num_ = 0; |