我怎么能清除一个MassTransit队列? [英] how can I purge a MassTransit queue?
问题描述
我想删除我的集成测试安装例程都从队列中的消息,我怎么能做到呢?没有运气与谷歌搜索/智能感知,暴力破解
I'd like to delete all the messages from a queue in my integration test SetUp routine, how can I accomplish that? No luck with googling/intellisense-bruteforce.
如果它很重要 - 我使用RabbitMQ的运输
If it matters -- I'm using RabbitMq as transport.
推荐答案
有没有办法从内部MassTransit队列中删除。对于测试,您可以通过 RabbitMQ的使用临时,随机队列的URI://本地主机/ *临时= TRUE
?。或者你也可以追加?临时= TRUE
到现有队列的URI的末尾有MT干净的东西了之后。注:目前,由于2.8,临时交流不清理。这应该在下一个版本中修复。
There's no way to "delete" from queues within MassTransit. For tests you can use temporary, random queue URIs via rabbitmq://localhost/*?temporary=true
. Or you can just append ?temporary=true
to the end of your existing queue URIs to have MT clean stuff up afterward. Note: Current, as of 2.8, temporary exchanges aren't cleaned up. This should be fixed by the next release.
这篇关于我怎么能清除一个MassTransit队列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!