What's the recommended method for moving messages from a RabbitMQ _error queue for another attempt?

1,719 views
Skip to first unread message

pasi...@georiot.com

unread,
Sep 4, 2013, 1:59:56 PM9/4/13
to masstrans...@googlegroups.com
I'm sorry if this is an obvious answer, but I searched around your website documentation, Googled, and still am not finding any thing that looks promising aside from BusDriver, which doesn't seem to work for me.

I've tried the following, but it just returns with no output and the queues remain as they were prior to running the command:

move -from:rabbitmq://localhost/myqueue_error -to:rabbitmq://localhost/myqueue

Couple questions:
1. does this tool work with rabbitmq?
2. Is there a built in MT method of retrying items that have ended up in the _error queue?

Thanks,
Jesse

pasi...@georiot.com

unread,
Sep 4, 2013, 6:22:40 PM9/4/13
to masstrans...@googlegroups.com
I should have added that I'm using MassTransit.NLogIntegration (latest from NuGet) by calling x.UseNLog() while creating my bus instance.

NLog.config is setup to write everything from the minLevel="Trace" to a flat file.

-
Jesse

pasi...@georiot.com

unread,
Sep 4, 2013, 6:36:27 PM9/4/13
to masstrans...@googlegroups.com
Ok, I just figured it out.  I didn't realize that NLog wouldn't output the actual exception when logging the ${message}.  You have to add in ${exception} to the format as well.


Cheers,
Jesse

Travis Smith

unread,
Sep 4, 2013, 9:57:55 PM9/4/13
to masstrans...@googlegroups.com
BusDrive does have RabbitMQ provided as a transport. It's not a tool I use often, nor Chris I believe, so it might just have an issue somewhere. 

So I gave it a swirl. Turns out the -to option needs to be an exchange. So I had to create an exchange for the second queue and bind the queue to it. 

.\BusDriver.exe
> move -from "rabbitmq://localhost/one" -to "rabbitmq://localhost/two-e"
-------------------------------------------------------------------------------
 Move messages from rabbitmq://localhost/one to rabbitmq://localhost/two-e
-------------------------------------------------------------------------------
    Message-Id: 1

1 message moved from rabbitmq://localhost/one to rabbitmq://localhost/two-e
>

-Travis


--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/9750fd33-410c-4d95-ae4f-f50747b9944b%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

pasi...@georiot.com

unread,
Sep 5, 2013, 12:06:42 PM9/5/13
to masstrans...@googlegroups.com
Travis, thanks for taking a look.  

It turns out I had 2 core reasons a lot of messages were going to the _error queue.  First, I had a missing try/catch/retry in one of my consumers, combined with a validation bug.  And second, when running via upstart, loading a custom config from a relative path wasn't working because the working directory was the root of the file system.  This path issue was causing initialization of the consumer to fail, hence the exhausted retries and moving of the message to _error.  Now that i have those two things fixed, I shouldn't have as urgent of a need for moving items between queues, but its great to know how to move these messages via busdriver should I need to in the future.

Those last two replies probably didn't make much sense here, as they were intended for another thread I created: https://groups.google.com/forum/#!topic/masstransit-discuss/WT8RYyMcrxE, on the topic of determining the cause of the messages moving to _error.  Related, but the wrong thread.  Sorry for the cross posting mix-up, not sure what i did there.  :P

But yeah, thanks for clarifying the usage of BusDriver. I'm sure this thread will come in handy for my team (and hopefully others) in the future.  :)

Cheers,
Jesse

-Travis


To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.

To post to this group, send email to masstrans...@googlegroups.com.

Chris Patterson

unread,
Sep 5, 2013, 1:24:19 PM9/5/13
to masstrans...@googlegroups.com
Yes, it does work, and was fixed to work with RabbitMQ in 2.8 I think.


Reply all
Reply to author
Forward
0 new messages