企业微信推送

This commit is contained in:
雷欧(林平凡)
2025-01-22 13:41:52 +08:00
parent 1bb4a3be7b
commit 10f3396b8c
2 changed files with 9 additions and 11 deletions

View File

@@ -31,11 +31,15 @@ public class MessageConsumerService implements RocketMQListener<JSONObject> {
private static final Logger logger = LoggerFactory.getLogger(MessageConsumerService.class);
@Autowired
private WxtsUtil wxtsUtil;
private final WxtsUtil wxtsUtil;
// create a rate limiter of 1 qps
RateLimiter rateLimiter = RateLimiter.create(0.5);
@Autowired
public MessageConsumerService(WxtsUtil wxtsUtil) {
this.wxtsUtil = wxtsUtil;
}
@Override
public void onMessage(JSONObject jsonObject) {
// 处理消息