{"action":"closed","issue":{"url":"https://api.github.com/repos/LeanKit-Labs/wascally/issues/113","repository_url":"https://api.github.com/repos/LeanKit-Labs/wascally","labels_url":"https://api.github.com/repos/LeanKit-Labs/wascally/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/LeanKit-Labs/wascally/issues/113/comments","events_url":"https://api.github.com/repos/LeanKit-Labs/wascally/issues/113/events","html_url":"https://github.com/LeanKit-Labs/wascally/issues/113","id":124670613,"number":113,"title":"zombie connections(flow connections) never closed","user":{"login":"BlueHotDog","id":231539,"avatar_url":"https://avatars.githubusercontent.com/u/231539?v=3","gravatar_id":"","url":"https://api.github.com/users/BlueHotDog","html_url":"https://github.com/BlueHotDog","followers_url":"https://api.github.com/users/BlueHotDog/followers","following_url":"https://api.github.com/users/BlueHotDog/following{/other_user}","gists_url":"https://api.github.com/users/BlueHotDog/gists{/gist_id}","starred_url":"https://api.github.com/users/BlueHotDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BlueHotDog/subscriptions","organizations_url":"https://api.github.com/users/BlueHotDog/orgs","repos_url":"https://api.github.com/users/BlueHotDog/repos","events_url":"https://api.github.com/users/BlueHotDog/events{/privacy}","received_events_url":"https://api.github.com/users/BlueHotDog/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/LeanKit-Labs/wascally/labels/investigating","name":"investigating","color":"fbca04"}],"state":"closed","locked":false,"assignee":{"login":"arobson","id":115508,"avatar_url":"https://avatars.githubusercontent.com/u/115508?v=3","gravatar_id":"","url":"https://api.github.com/users/arobson","html_url":"https://github.com/arobson","followers_url":"https://api.github.com/users/arobson/followers","following_url":"https://api.github.com/users/arobson/following{/other_user}","gists_url":"https://api.github.com/users/arobson/gists{/gist_id}","starred_url":"https://api.github.com/users/arobson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arobson/subscriptions","organizations_url":"https://api.github.com/users/arobson/orgs","repos_url":"https://api.github.com/users/arobson/repos","events_url":"https://api.github.com/users/arobson/events{/privacy}","received_events_url":"https://api.github.com/users/arobson/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-01-03T20:53:43Z","updated_at":"2016-06-04T18:48:13Z","closed_at":"2016-06-04T18:48:13Z","body":"Hi, i've the following code:\r\n```\r\nconst _ = require('lodash');\r\nconst config = ...\r\nconst rabbit = require('wascally');\r\nconst debug = require('debug')('wascally-helpers');\r\n\r\nfunction exitOnConnectionClosed() {\r\n  debug(\"connection closed\");\r\n  throw new Error(\"connection closed\");\r\n}\r\n\r\nfunction exitOnConnectionFailed() {\r\n  debug(\"connection failed\");\r\n  throw new Error(\"connection failed\");\r\n}\r\n\r\nfunction setupRabbit(isExitOnClosed, isExitOnFailed) {\r\n  if (_.isUndefined(isExitOnClosed)) {\r\n    isExitOnClosed = true;\r\n  }\r\n  if (_.isUndefined(isExitOnFailed)) {\r\n    isExitOnFailed = true;\r\n  }\r\n  if (isExitOnClosed) {\r\n    rabbit.on('*.connection.closed', exitOnConnectionClosed);\r\n  }\r\n\r\n  if (isExitOnFailed) {\r\n    rabbit.on(\"*.connection.failed\", exitOnConnectionFailed);\r\n  }\r\n\r\n  return rabbit\r\n    .configure(config)\r\n    .then(function () {\r\n      rabbit.nackOnError();\r\n      rabbit.nackUnhandled();\r\n      return rabbit;\r\n    });\r\n}\r\n\r\nmodule.exports = _.once(setupRabbit);\r\n```\r\n\r\nthe reason behind the auto-exit, is as a best practice from node, on-error, exit and retry, this proved to be the most stable solution for a worker use-case\r\n\r\nthe problem with that, is that we're now seeing a lot of \"flow\" connections in rabbit, and also zombie consumers.\r\n\r\ntried a lot of things :(\r\n\r\nnothing helps\r\n"}}
{"actor":{"display_login":"arobson"}}