Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有人有任何示例脚本来生成从服务代理队列接收消息但未从中删除的场景。我们认为我们在生产中不时会遇到这种情况,但根本无法在本地复制它。
如果您在事务中收到消息然后提交事务,则会从队列中删除消息(除非保留 = on,但保留消息会更改其状态)。
但是,如果您在事务中收到消息,对其进行处理并回滚事务,则消息将保留在队列中。
在您的情况下,可能有一些未处理的异常导致此行为(并且并非代码中的所有事件都在接收消息的同一事务中)。