{"action":"created","issue":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-dotnet-client/issues/144","repository_url":"https://api.github.com/repos/rabbitmq/rabbitmq-dotnet-client","labels_url":"https://api.github.com/repos/rabbitmq/rabbitmq-dotnet-client/issues/144/labels{/name}","comments_url":"https://api.github.com/repos/rabbitmq/rabbitmq-dotnet-client/issues/144/comments","events_url":"https://api.github.com/repos/rabbitmq/rabbitmq-dotnet-client/issues/144/events","html_url":"https://github.com/rabbitmq/rabbitmq-dotnet-client/issues/144","id":121630666,"number":144,"title":"EventingBasicConsumer Shutdown event fires twice","user":{"login":"Nicholi","id":959775,"avatar_url":"https://avatars.githubusercontent.com/u/959775?v=3","gravatar_id":"","url":"https://api.github.com/users/Nicholi","html_url":"https://github.com/Nicholi","followers_url":"https://api.github.com/users/Nicholi/followers","following_url":"https://api.github.com/users/Nicholi/following{/other_user}","gists_url":"https://api.github.com/users/Nicholi/gists{/gist_id}","starred_url":"https://api.github.com/users/Nicholi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nicholi/subscriptions","organizations_url":"https://api.github.com/users/Nicholi/orgs","repos_url":"https://api.github.com/users/Nicholi/repos","events_url":"https://api.github.com/users/Nicholi/events{/privacy}","received_events_url":"https://api.github.com/users/Nicholi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-dotnet-client/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-dotnet-client/labels/effort-low","name":"effort-low","color":"88b3e4"},{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-dotnet-client/labels/usability","name":"usability","color":"bfe5bf"}],"state":"open","locked":false,"assignee":{"login":"michaelklishin","id":1090,"avatar_url":"https://avatars.githubusercontent.com/u/1090?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelklishin","html_url":"https://github.com/michaelklishin","followers_url":"https://api.github.com/users/michaelklishin/followers","following_url":"https://api.github.com/users/michaelklishin/following{/other_user}","gists_url":"https://api.github.com/users/michaelklishin/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelklishin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelklishin/subscriptions","organizations_url":"https://api.github.com/users/michaelklishin/orgs","repos_url":"https://api.github.com/users/michaelklishin/repos","events_url":"https://api.github.com/users/michaelklishin/events{/privacy}","received_events_url":"https://api.github.com/users/michaelklishin/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-dotnet-client/milestones/13","html_url":"https://github.com/rabbitmq/rabbitmq-dotnet-client/milestones/3.6.2","labels_url":"https://api.github.com/repos/rabbitmq/rabbitmq-dotnet-client/milestones/13/labels","id":1593155,"number":13,"title":"3.6.2","description":null,"creator":{"login":"dumbbell","id":159804,"avatar_url":"https://avatars.githubusercontent.com/u/159804?v=3","gravatar_id":"","url":"https://api.github.com/users/dumbbell","html_url":"https://github.com/dumbbell","followers_url":"https://api.github.com/users/dumbbell/followers","following_url":"https://api.github.com/users/dumbbell/following{/other_user}","gists_url":"https://api.github.com/users/dumbbell/gists{/gist_id}","starred_url":"https://api.github.com/users/dumbbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dumbbell/subscriptions","organizations_url":"https://api.github.com/users/dumbbell/orgs","repos_url":"https://api.github.com/users/dumbbell/repos","events_url":"https://api.github.com/users/dumbbell/events{/privacy}","received_events_url":"https://api.github.com/users/dumbbell/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2016-02-19T14:31:19Z","updated_at":"2016-04-13T15:20:34Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-12-11T03:40:26Z","updated_at":"2016-04-13T15:24:18Z","closed_at":null,"body":"Was just hooking into the events and noticed the Shutdown event fires twice for EventingBasicConsumer. Unsure if this is known/desired behavior or a bug.\r\n\r\nHere is a quick sample. Nothing special or out of the ordinary imo.\r\nUsing latest client as of this writing, 3.5.6.\r\n\r\n```csharp\r\n    var connectionFactory = new ConnectionFactory();\r\n    connectionFactory.Uri = \"amqp://user:pass@localhost:5672/dev\";\r\n    var mqExchange = \"devExchange\";\r\n    var mqQueue = \"devQueue\";\r\n    var mqQueueRouteKey = \"rk_devQueue\";\r\n\r\n    using (var mqConn = connectionFactory.CreateConnection())\r\n    using (var listenChannel = mqConn.CreateModel())\r\n    {\r\n        mqConn.ConnectionShutdown += (o, a) => Console.WriteLine(\"Connection Shutdown\");\r\n        listenChannel.ModelShutdown += (o, a) => Console.WriteLine(\"Model Shutdown\");\r\n\r\n        listenChannel.ExchangeDeclare(mqExchange, ExchangeType.Direct, true, false, null);\r\n        listenChannel.QueueDeclare(mqQueue, true, false, false, null);\r\n        listenChannel.QueueBind(mqQueue, mqExchange, mqQueueRouteKey, null);\r\n\r\n        var consumer = new EventingBasicConsumer(listenChannel);\r\n        consumer.Shutdown += (o, a) => Console.WriteLine(\"Consumer Shutdown\");\r\n        String consumerTag = listenChannel.BasicConsume(mqQueue, false, consumer);\r\n\r\n        // same happens if you just let the using dispose statements close the connection\r\n        mqConn.Close();\r\n    }\r\n```\r\n\r\nOutput is:\r\n```\r\nModel Shutdown\r\nConsumer Shutdown\r\nConsumer Shutdown\r\nConnection Shutdown\r\nPress any key to continue . . .\r\n```"},"comment":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-dotnet-client/issues/comments/209507677","html_url":"https://github.com/rabbitmq/rabbitmq-dotnet-client/issues/144#issuecomment-209507677","issue_url":"https://api.github.com/repos/rabbitmq/rabbitmq-dotnet-client/issues/144","id":209507677,"user":{"login":"michaelklishin","id":1090,"avatar_url":"https://avatars.githubusercontent.com/u/1090?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelklishin","html_url":"https://github.com/michaelklishin","followers_url":"https://api.github.com/users/michaelklishin/followers","following_url":"https://api.github.com/users/michaelklishin/following{/other_user}","gists_url":"https://api.github.com/users/michaelklishin/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelklishin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelklishin/subscriptions","organizations_url":"https://api.github.com/users/michaelklishin/orgs","repos_url":"https://api.github.com/users/michaelklishin/repos","events_url":"https://api.github.com/users/michaelklishin/events{/privacy}","received_events_url":"https://api.github.com/users/michaelklishin/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T15:24:18Z","updated_at":"2016-04-13T15:24:18Z","body":"Thank you for looking into this, @hairyhum. This was accidentally introduced in a monster community member patch in https://github.com/rabbitmq/rabbitmq-dotnet-client/commit/795a718c1973f418ce7f6adac866ae587b03a4db."}}