question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Detach throws exception on ReceiverLink

See original GitHub issue

I am wondering why it is expected for Detach to throw exception when called on ReceiverLink?

To add more context to my question, the problem only appears when I use built in ContainerHost. When I connect to ActiveMQ Artemis I can Detach without any errors.

From what I see in the code this seems to be the culprit:

https://github.com/Azure/amqpnetlite/blob/d677f79855b04e58fc75bc3105a1fdb6021f53cf/src/Link.cs#L183-L187

SendDetach totally ignores detach parameter and sends new Detach command with flag Closed set to true.

I suggest the following change to fix this issue.

else if (this.state == LinkState.Attached)
{
    this.session.SendCommand(detach);
    this.state = LinkState.End;
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
xinchen10commented, Jun 15, 2019

We can update ILinkProcessor to also handle detach command, and determine if a link should be detached or closed. That should be possible.

0reactions
HavretGCcommented, Aug 2, 2019

I think this issue can be closed now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AMQP ReceiverLink after accepting the message is not ...
I am accepting the messages, but the dequeued count remains 0 in UI. Queue Information. From the receiverlink API documentation, "Application ...
Read more >
Receiver (Qpid ProtonJ2 Parent 1.0.0-M1 API)
Requests a detach of the Receiver link at the remote and returns a Future that will be completed once the link has been...
Read more >
Troubleshoot AMQP errors in Azure Service Bus
Provides a list of AMQP errors you may receive when using Azure Service Bus, and cause of those errors.
Read more >
Class Link - Amqp
The error causing a detach. Remarks. An exception will be thrown if the peer responded with an error or the link was closed...
Read more >
Interface ILink
The error causing a detach. Remarks. An exception will be thrown if the peer responded with an error or the link was closed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found