{"action":"created","issue":{"url":"https://api.github.com/repos/nuclio/nuclio/issues/944","repository_url":"https://api.github.com/repos/nuclio/nuclio","labels_url":"https://api.github.com/repos/nuclio/nuclio/issues/944/labels{/name}","comments_url":"https://api.github.com/repos/nuclio/nuclio/issues/944/comments","events_url":"https://api.github.com/repos/nuclio/nuclio/issues/944/events","html_url":"https://github.com/nuclio/nuclio/pull/944","id":359544369,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1MDExMjky","number":944,"title":"Update NATS trigger to use queue subscriptions","user":{"login":"phi2039","id":859293,"node_id":"MDQ6VXNlcjg1OTI5Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/859293?v=4","gravatar_id":"","url":"https://api.github.com/users/phi2039","html_url":"https://github.com/phi2039","followers_url":"https://api.github.com/users/phi2039/followers","following_url":"https://api.github.com/users/phi2039/following{/other_user}","gists_url":"https://api.github.com/users/phi2039/gists{/gist_id}","starred_url":"https://api.github.com/users/phi2039/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phi2039/subscriptions","organizations_url":"https://api.github.com/users/phi2039/orgs","repos_url":"https://api.github.com/users/phi2039/repos","events_url":"https://api.github.com/users/phi2039/events{/privacy}","received_events_url":"https://api.github.com/users/phi2039/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2018-09-12T15:49:29Z","updated_at":"2018-09-15T14:57:00Z","closed_at":"2018-09-15T14:56:14Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/nuclio/nuclio/pulls/944","html_url":"https://github.com/nuclio/nuclio/pull/944","diff_url":"https://github.com/nuclio/nuclio/pull/944.diff","patch_url":"https://github.com/nuclio/nuclio/pull/944.patch"},"body":"The NATS trigger currently creates a new standard subscription for each processor instance. As a result, every replica of a deployed function receives a notification for every message published to the configured topic (i.e. every message is processed 'n' times). This essentially eliminates the benefits of distributed event handling (with the exception of some level of increased certainty that an event will be handled at least once).\r\n\r\nNATS supports an additional round-robin messaging type that allows subscribers to specify a (worker group) queue name along with a topic pattern when subscribing. The queue acts as a single subscriber, and messages are load-balanced across members of the worker group. See [NATS Docs](https://nats.io/documentation/writing_applications/subscribing/)\r\n\r\nThis PR updates the NATS trigger to enable processor instances associated with the same trigger definition to join the same queue. A queue name may be supplied or generated automatically.\r\n\r\n-- Still completing testing, but wanted to get initial feedback re: the need to continue to allow 'broadcast' subscriptions (i.e. trigger all replicas for every message) and naming convention for generated queue names (should be globally unique per trigger definition)"},"comment":{"url":"https://api.github.com/repos/nuclio/nuclio/issues/comments/421582523","html_url":"https://github.com/nuclio/nuclio/pull/944#issuecomment-421582523","issue_url":"https://api.github.com/repos/nuclio/nuclio/issues/944","id":421582523,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTU4MjUyMw==","user":{"login":"pavius","id":423987,"node_id":"MDQ6VXNlcjQyMzk4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/423987?v=4","gravatar_id":"","url":"https://api.github.com/users/pavius","html_url":"https://github.com/pavius","followers_url":"https://api.github.com/users/pavius/followers","following_url":"https://api.github.com/users/pavius/following{/other_user}","gists_url":"https://api.github.com/users/pavius/gists{/gist_id}","starred_url":"https://api.github.com/users/pavius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavius/subscriptions","organizations_url":"https://api.github.com/users/pavius/orgs","repos_url":"https://api.github.com/users/pavius/repos","events_url":"https://api.github.com/users/pavius/events{/privacy}","received_events_url":"https://api.github.com/users/pavius/received_events","type":"User","site_admin":false},"created_at":"2018-09-15T14:57:00Z","updated_at":"2018-09-15T14:57:00Z","author_association":"CONTRIBUTOR","body":"Oh, note that merging to development auto builds / releases the \"unstable\" images (takes about 20 minutes). So if you want to use images from upstream this is the way to go until 0.5.9 is released in a few days. Thanks for the great contribution!"}}
{"actor":{"display_login":"pavius"}}