且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

JmsTemplate没有发送超时

更新时间:2023-01-15 11:00:39

这都是没有道理的.

如果尝试将消息放入无效队列,则MQ IMMEDIATELY会引发异常,原因码为2085(未知对象).无需超时.显然,您正在使用的框架存在一个错误,即它没有捕获引发的异常!!!

If you attempt to put a message to an invalid queue, MQ IMMEDIATELY throws an exception with a reason code 2085 (unknown object). There is no timeout required. Obviously, the framework you are using has a bug in it that it is not catching the thrown exception!!!

仅使用JMS和MQ尝试相同的测试,就会发现差异.

Try the same test using just JMS and MQ, and you will see the difference.