{"action":"created","issue":{"url":"https://api.github.com/repos/judwhite/NsqSharp/issues/29","repository_url":"https://api.github.com/repos/judwhite/NsqSharp","labels_url":"https://api.github.com/repos/judwhite/NsqSharp/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/judwhite/NsqSharp/issues/29/comments","events_url":"https://api.github.com/repos/judwhite/NsqSharp/issues/29/events","html_url":"https://github.com/judwhite/NsqSharp/issues/29","id":104314613,"number":29,"title":"Refactor MessageTopicRouter GetTopics","user":{"login":"judwhite","id":729716,"avatar_url":"https://avatars.githubusercontent.com/u/729716?v=3","gravatar_id":"","url":"https://api.github.com/users/judwhite","html_url":"https://github.com/judwhite","followers_url":"https://api.github.com/users/judwhite/followers","following_url":"https://api.github.com/users/judwhite/following{/other_user}","gists_url":"https://api.github.com/users/judwhite/gists{/gist_id}","starred_url":"https://api.github.com/users/judwhite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/judwhite/subscriptions","organizations_url":"https://api.github.com/users/judwhite/orgs","repos_url":"https://api.github.com/users/judwhite/repos","events_url":"https://api.github.com/users/judwhite/events{/privacy}","received_events_url":"https://api.github.com/users/judwhite/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/judwhite/NsqSharp/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/judwhite/NsqSharp/labels/maybe","name":"maybe","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2015-09-01T17:17:31Z","updated_at":"2016-07-31T21:21:07Z","closed_at":null,"body":"In configuration code often has to be duplicated between `IMessageTopicRouter.GetTopics` and `IMessageTopicRouter.GetMessageTopic`. Consumers could instead be spun up by the bus dynamically by polling nsqlookupd looking for pattern matches based on the original topic from `IMessageTypeToTopicProvider`.\r\n\r\nThis would reduce unnecessary Consumers for topics which don't exist yet and let applications remove duplicated configuration code.\r\n\r\nhttps://github.com/judwhite/NsqSharp/blob/master/NsqSharp/Bus/Configuration/IMessageTopicRouter.cs\r\n\r\nhttps://github.com/judwhite/NsqSharp/blob/master/NsqSharp/Bus/Configuration/Providers/IMessageTypeToTopicProvider.cs"},"comment":{"url":"https://api.github.com/repos/judwhite/NsqSharp/issues/comments/236457390","html_url":"https://github.com/judwhite/NsqSharp/issues/29#issuecomment-236457390","issue_url":"https://api.github.com/repos/judwhite/NsqSharp/issues/29","id":236457390,"user":{"login":"judwhite","id":729716,"avatar_url":"https://avatars.githubusercontent.com/u/729716?v=3","gravatar_id":"","url":"https://api.github.com/users/judwhite","html_url":"https://github.com/judwhite","followers_url":"https://api.github.com/users/judwhite/followers","following_url":"https://api.github.com/users/judwhite/following{/other_user}","gists_url":"https://api.github.com/users/judwhite/gists{/gist_id}","starred_url":"https://api.github.com/users/judwhite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/judwhite/subscriptions","organizations_url":"https://api.github.com/users/judwhite/orgs","repos_url":"https://api.github.com/users/judwhite/repos","events_url":"https://api.github.com/users/judwhite/events{/privacy}","received_events_url":"https://api.github.com/users/judwhite/received_events","type":"User","site_admin":false},"created_at":"2016-07-31T21:21:07Z","updated_at":"2016-07-31T21:21:07Z","body":"The current implementation forces topics to be unique and not truly dynamic, which is necessary for a Topic -> Type mapping. This guarantee is useful.\r\n\r\nWe could avoid spinning up Consumers for topics which don't exist by polling nsqlookupd's before creating the Consumer. This would reduce the number of active threads in this scenario, but the complexity doesn't seem worth the edge case savings."}}
{"actor":{"display_login":"judwhite"}}