Is there a way to specify a different Error Queue when using EasyNetQ.Hosepipe?

為{幸葍}努か 提交于 2019-12-24 00:56:47

问题


I recently posted the following question...

Custom Error Queue Name when using EasyNetQ for RabbitMQ?

... 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).

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

... 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, 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.


回答1:


Have you tried specifying the q: parameter?

EasyNetQ.Hosepipe.exe dump s:localhost u:guest p:guest q:my_queue o:C:\temp\messages

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

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



来源:https://stackoverflow.com/questions/28738683/is-there-a-way-to-specify-a-different-error-queue-when-using-easynetq-hosepipe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!