有没有办法使用EasyNetQ.Hosepipe时指定一个不同的错误队列? [英] Is there a way to specify a different Error Queue when using EasyNetQ.Hosepipe?
问题描述
我最近公布了以下问题...
I recently posted the following question...
<一个href="http://stackoverflow.com/questions/28696339/custom-error-queue-name-when-using-easynetq-for-rabbitmq/28716620#28716620">Custom使用EasyNetQ的RabbitMQ的错误时,队列名称?
...并提供了一些关于如何使用EasyNetQ的时候,而不是让所有未处理的异常进入默认的错误队列(EasyNetQ_Default_Error_Queue)使用不同的,特定的应用程序错误队列名称的解决方案。
... and was provided with a solution on how to use different, application specific Error Queue names when using EasyNetQ, rather than having all unhandled exceptions go into the default error queue (EasyNetQ_Default_Error_Queue).
什么我现在想的是能够执行以下操作时使用EasyNetQ.Hosepipe.exe转储所有从哪个错误队列我指定了错误信息,因为它的默认行为,按照文档...
What I'd now like is to be able to use EasyNetQ.Hosepipe.exe to dump all of the error messages from whichever Error queue I specify, as its default behaviour when doing the following, as per the documentation...
EasyNetQ.Hosepipe.exe err s:localhost o:C:\temp\messages
...是转储从EasyNetQ_Default_Error_Queue任何消息,到一个文件夹,在我的情况下,这种默认的错误队列将永远现在是空的。
... is to dump any messages from the EasyNetQ_Default_Error_Queue, into a folder, and in my case, this default error queue will always be empty now.
previously,使用默认的错误队列时,我可以用上面的软管犯错的方法,然后用软管重试...
Previously, when using the default error queue, I could use the above hosepipe err method, then use hosepipe retry...
EasyNetQ.Hosepipe.exe retry s:localhost u:guest p:guest o:C:\temp\messages
......,它将把所有的倾倒错误信息返回到重新处理其各自的队列中。
... and it would put all of the dumped error messages back into their respective queues for re-processing.
推荐答案
您是否尝试过指定Q:参数
Have you tried specifying the q: parameter?
EasyNetQ.Hosepipe.exe dump s:localhost u:guest p:guest q:my_queue o:C:\temp\messages
我没有用软管,但这是从软管项目usage.txt:
I haven't used hosepipe, but this is from the usage.txt in the hosepipe project:
的https://github.com/EasyNetQ/EasyNetQ/blob/master/Source/EasyNetQ.Hosepipe/Usage.txt
更新: 软管现在支持一个Q参数从不使用标准的命名约定错误队列为:
UPDATE: HosePipe now supports a 'q' parameter to read from error queues that don't use the standard naming convention:
的https://github.com/nvmlabs/EasyNetQ/commit/7945ff0f2c9d2e17088f109a542219fb5b11c3ab
这篇关于有没有办法使用EasyNetQ.Hosepipe时指定一个不同的错误队列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!