문제

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.

If it matters -- I'm using RabbitMq as transport.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top