(RabbitMQ Client C#) Unable to subscribe to Queue 2, After Dead Letter in Queue 1 routed to Queue 2

191 views
Skip to first unread message

eric tech

unread,
Jun 14, 2019, 1:32:34 AM6/14/19
to rabbitmq-users
Hi, Good Day

I using CFX library as publisher to publish a message to Exchange "TestQueue1" which route message to Queue 1.
By using max-length to make queue head drop as dead letter.
Dead Letter will route to Exchange "GSF.TEST" then route to Queue 2.

Then having a Rabbit Client (C#) to subscribe to Queue 2.
It throw ex error :
"The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=541, text=\"INTERNAL_ERROR\", classId=0, methodId=0, cause="

I simulate the error few times, below are message look like using RabbitMQ management (Before and After dead letter routing)
Can read the message using RabbitMQ management, however, failed to subscribe to dequeue the message using RabbitMQ client.

Before dead letter routing:
before.png


After dead letter routing:
after.png

Please help advice, if anyone encounter same issue or having solution for this. Thanks !

Karl Nilsson

unread,
Jun 14, 2019, 4:32:26 AM6/14/19
to rabbitm...@googlegroups.com
Do the RabbitMQ server logs have anything around the same time?

--
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.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/557dbb3c-5fd9-4163-aa51-ff741cb3dd8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Karl Nilsson

Pivotal/RabbitMQ

eric tech

unread,
Jun 17, 2019, 4:10:48 AM6/17/19
to rabbitmq-users
Hi Karl,

It do not have any error log.
****btw, my logging level set as debug


On Friday, June 14, 2019 at 4:32:26 PM UTC+8, Karl Nilsson wrote:
Do the RabbitMQ server logs have anything around the same time?

On Fri, 14 Jun 2019 at 06:32, eric tech <tech....@gmail.com> wrote:
Hi, Good Day

I using CFX library as publisher to publish a message to Exchange "TestQueue1" which route message to Queue 1.
By using max-length to make queue head drop as dead letter.
Dead Letter will route to Exchange "GSF.TEST" then route to Queue 2.

Then having a Rabbit Client (C#) to subscribe to Queue 2.
It throw ex error :
"The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=541, text=\"INTERNAL_ERROR\", classId=0, methodId=0, cause="

I simulate the error few times, below are message look like using RabbitMQ management (Before and After dead letter routing)
Can read the message using RabbitMQ management, however, failed to subscribe to dequeue the message using RabbitMQ client.

Before dead letter routing:
before.png


After dead letter routing:
after.png

Please help advice, if anyone encounter same issue or having solution for this. Thanks !

--
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 rabbitm...@googlegroups.com.

To post to this group, send email to rabbitm...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/557dbb3c-5fd9-4163-aa51-ff741cb3dd8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Karl Nilsson

Pivotal/RabbitMQ

Karl Nilsson

unread,
Jun 17, 2019, 4:30:25 AM6/17/19
to rabbitm...@googlegroups.com
Can you post a minimal code sample that reproduces the error?

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.


--
Karl Nilsson

Pivotal/RabbitMQ

eric tech

unread,
Jun 17, 2019, 11:03:32 PM6/17/19
to rabbitmq-users
Hi Karl,

Attach are the simplified code, WinForm (.Net 4.6.2)

NuGet:
- RabbitMQ.Client
- CFX.CFXSDK

Attach images are the steps and setup require. Thanks

Resource Setup.JPG

steps.JPG






On Monday, June 17, 2019 at 4:30:25 PM UTC+8, Karl Nilsson wrote:
Can you post a minimal code sample that reproduces the error?



--
Karl Nilsson

Pivotal/RabbitMQ
Form3.cs

eric tech

unread,
Jun 17, 2019, 11:05:06 PM6/17/19
to rabbitmq-users
repost images, Images not showing properly.
Resource Setup.JPG
steps.JPG

eric tech

unread,
Jun 18, 2019, 1:29:03 AM6/18/19
to rabbitmq-users
Hi Karl

I found that the root cause, when first publish to "/exchange/TestQueue1" without a routing key, it will cause error.
If publish with routing key it will not cause error.

Karl Nilsson

unread,
Jun 18, 2019, 4:05:56 AM6/18/19
to rabbitm...@googlegroups.com
Maybe CFX requires that meta data to be there? I've never used no heard of CFX so can't really say for sure.

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.


--
Karl Nilsson

Pivotal/RabbitMQ

eric tech

unread,
Jun 18, 2019, 4:34:39 AM6/18/19
to rabbitmq-users
Hi Karl,

In the consumer side using RabbitMQ client, in my POV kinda suspect probably there are bug on that.
Firstly, there are no routing key, but after dead letter, routing key are assigned. Probably, it try to interpret routing key and get null.

Anyway, thanks for your help. 



On Tuesday, June 18, 2019 at 4:05:56 PM UTC+8, Karl Nilsson wrote:
Maybe CFX requires that meta data to be there? I've never used no heard of CFX so can't really say for sure.



--
Karl Nilsson

Pivotal/RabbitMQ

Karl Nilsson

unread,
Jun 18, 2019, 4:48:00 AM6/18/19
to rabbitm...@googlegroups.com
If you can make a console application repro using only the standard .NET client that would be helpful. I can't compile winforms applications.

Cheers

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.


--
Karl Nilsson

Pivotal/RabbitMQ

eric tech

unread,
Jun 18, 2019, 8:19:04 PM6/18/19
to rabbitmq-users
Hi Karl,

I do not share you the entire project, but its enough to reproduce the application.

You may create WinForm application then copy the code into Form1 code behind (Please take note, the code is using Form3)

Should able to build an Exe program.


On Tuesday, June 18, 2019 at 4:48:00 PM UTC+8, Karl Nilsson wrote:
If you can make a console application repro using only the standard .NET client that would be helpful. I can't compile winforms applications.

Cheers



--
Karl Nilsson

Pivotal/RabbitMQ

eric tech

unread,
Jun 18, 2019, 9:30:23 PM6/18/19
to rabbitmq-users
Hi Karl,

I tried to publish messages using RabbitMQ management (means not using C# program and CFX).
When using C# RabbitMQ client to dequeue message also having the same error.
Seem like, missing routing key is the reason causing the error.


On Tuesday, June 18, 2019 at 4:48:00 PM UTC+8, Karl Nilsson wrote:
If you can make a console application repro using only the standard .NET client that would be helpful. I can't compile winforms applications.

Cheers



--
Karl Nilsson

Pivotal/RabbitMQ
Reply all
Reply to author
Forward
0 new messages