Error handling in EasyNetQ

254 views
Skip to first unread message

Simon

unread,
Feb 17, 2017, 2:08:42 AM2/17/17
to rabbitmq-users
Hi Everyone,

If there is any error occurred in the subscribe call back method, should the message caused the error go into the default error queue?

var busControl = RabbitHutch.CreateBus("host=localhost; virtualHost=/; username=user; password=password",
                x => x.Register<IEasyNetQLogger>(_ => new MyLogger()));

busControl.Subscribe<AccountUpdated>("subid",
                message =>
                {
                    throw new EasyNetQException("Message processing exception - look in the default error queue (broker)");
                });

I thought the message should go into the default error queue, but it still sits in the queue and has status of unacked in RabbitMQ.
I am wondering if I miss anything here?

Thanks
Simon


Karl Nilsson

unread,
Feb 17, 2017, 3:21:05 AM2/17/17
to rabbitm...@googlegroups.com
Hi,

You may have more luck on the EasyNetQ mailing list [1]. IIRC messages are meant to be re-published to a special EasyNetQ error queue so not sure what is going on there. Perhaps try throwing a difference exception?


Cheers
Karl

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Karl Nilsson

Staff Software Engineer, Pivotal/RabbitMQ

Simon

unread,
Feb 19, 2017, 10:38:20 PM2/19/17
to rabbitmq-users
Hi Karl,

You are right. This is more for EasyNetQ and I will try my luck on EasyNetQ mailing list. Thanks

Regards,
Simon

On Friday, February 17, 2017 at 7:21:05 PM UTC+11, Karl Nilsson wrote:
Hi,

You may have more luck on the EasyNetQ mailing list [1]. IIRC messages are meant to be re-published to a special EasyNetQ error queue so not sure what is going on there. Perhaps try throwing a difference exception?


Cheers
Karl
On 17 February 2017 at 07:08, Simon <simon...@gmail.com> wrote:
Hi Everyone,

If there is any error occurred in the subscribe call back method, should the message caused the error go into the default error queue?

var busControl = RabbitHutch.CreateBus("host=localhost; virtualHost=/; username=user; password=password",
                x => x.Register<IEasyNetQLogger>(_ => new MyLogger()));

busControl.Subscribe<AccountUpdated>("subid",
                message =>
                {
                    throw new EasyNetQException("Message processing exception - look in the default error queue (broker)");
                });

I thought the message should go into the default error queue, but it still sits in the queue and has status of unacked in RabbitMQ.
I am wondering if I miss anything here?

Thanks
Simon


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages