很多系统的logback配置未启用异步输出日志的方式,在高并发时容易造成大量日志线程阻塞,导致系统TPS压上不去。
最近有个项目想测试mq平台的性能,顺便测试自身业务的消费能力。
本帅心里其实是拒绝的,MQ本身的性能实际上不需要做测试(公司MQ平台已上线多年,日均几十亿的流量完全没问题,该业务只有几百tps的消费能力),这种把消息抛出去没有返回的业务挺难过的。无奈项目组强烈要求,只能当成测试业务消费能力了。
由于无法直接得知消息的消费情况,与项目组商议,从业务数据的入库情况,计算每秒入库的数据作为TPS。
言归正传,来看看怎么写mq消息发送的脚本。
Apache Shiro? is a powerful and easy-to-use Java security framework that performs authentication, authorization, cryptography, and session management. With Shiro’s easy-to-understand API, you can quickly and easily secure any application – from the smallest mobile applications to the largest web and enterprise applications.