{"action":"created","comment":{"url":"https://api.github.com/repos/100health/redox-rabbit/pulls/comments/102842852","pull_request_review_id":23612970,"id":102842852,"diff_hunk":"@@ -31,58 +29,38 @@ All methods will automatically connect to the RabbitMQ server on first use.\n **isOrdered**|*boolean*|must results be returned in order?\n **cb**|*Function*|Callback\n \n-Add a new input queue.  Input and output queues will be created if they do not exist. Only **name** and **cb** are required. If no destination is specified the queue must be un-ordered (it will be both the input and output queue).\n+Create a Producer which can be used to send messages. Input and output queues will be created if they do not exist. Only **name** and **cb** are required. If no destination is specified the queue must be un-ordered (it will be both the input and output queue).\n+\n+The Producer instance will be passed to the callback. It has a single method: `send()` which accepts an object argument.\n \n **Example:**\n \n ```js\n-//add an ordered queue\n-Producer.addQueue('myInputQueue', 'myOutputQueue', true, function(err){\n+//create an ordered queue\n+Producer.createProducer('myInputQueue', 'myOutputQueue', true, function(err,myProducer){","path":"README.md","position":26,"original_position":26,"commit_id":"6085602c1dc2b65f45298457401cf0f5aadf2f13","original_commit_id":"6085602c1dc2b65f45298457401cf0f5aadf2f13","user":{"login":"tobalsgithub","id":1554930,"avatar_url":"https://avatars.githubusercontent.com/u/1554930?v=3","gravatar_id":"","url":"https://api.github.com/users/tobalsgithub","html_url":"https://github.com/tobalsgithub","followers_url":"https://api.github.com/users/tobalsgithub/followers","following_url":"https://api.github.com/users/tobalsgithub/following{/other_user}","gists_url":"https://api.github.com/users/tobalsgithub/gists{/gist_id}","starred_url":"https://api.github.com/users/tobalsgithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobalsgithub/subscriptions","organizations_url":"https://api.github.com/users/tobalsgithub/orgs","repos_url":"https://api.github.com/users/tobalsgithub/repos","events_url":"https://api.github.com/users/tobalsgithub/events{/privacy}","received_events_url":"https://api.github.com/users/tobalsgithub/received_events","type":"User","site_admin":false},"body":"When would we have an output queue but have the original queue un-ordered? Wondering if we need that third parameter, or if we can just always assume that it's an ordered queue if we pass in an output queue.\r\n\r\nBasically, what's the point of using the broker if order doesn't matter?","created_at":"2017-02-23T23:08:10Z","updated_at":"2017-02-23T23:42:40Z","html_url":"https://github.com/100health/redox-rabbit/pull/2#discussion_r102842852","pull_request_url":"https://api.github.com/repos/100health/redox-rabbit/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/100health/redox-rabbit/pulls/comments/102842852"},"html":{"href":"https://github.com/100health/redox-rabbit/pull/2#discussion_r102842852"},"pull_request":{"href":"https://api.github.com/repos/100health/redox-rabbit/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/100health/redox-rabbit/pulls/2","id":107722441,"html_url":"https://github.com/100health/redox-rabbit/pull/2","diff_url":"https://github.com/100health/redox-rabbit/pull/2.diff","patch_url":"https://github.com/100health/redox-rabbit/pull/2.patch","issue_url":"https://api.github.com/repos/100health/redox-rabbit/issues/2","number":2,"state":"open","locked":false,"title":"refactor producer and support JSON","user":{"login":"matt-cook","id":626516,"avatar_url":"https://avatars.githubusercontent.com/u/626516?v=3","gravatar_id":"","url":"https://api.github.com/users/matt-cook","html_url":"https://github.com/matt-cook","followers_url":"https://api.github.com/users/matt-cook/followers","following_url":"https://api.github.com/users/matt-cook/following{/other_user}","gists_url":"https://api.github.com/users/matt-cook/gists{/gist_id}","starred_url":"https://api.github.com/users/matt-cook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt-cook/subscriptions","organizations_url":"https://api.github.com/users/matt-cook/orgs","repos_url":"https://api.github.com/users/matt-cook/repos","events_url":"https://api.github.com/users/matt-cook/events{/privacy}","received_events_url":"https://api.github.com/users/matt-cook/received_events","type":"User","site_admin":false},"body":"- Refactor `Producer` to return an instance from a creation method\r\n- Support JSON messages\r\n- Handle consumer not passing a result into the callback\r\n\r\nOnce we're a bit more stable this should also involve incrementing the version number using sem. ver. In this case it would go to `1.0.0` since this is a breaking change. \r\n\r\nNeed to do some additional work on handling errors passed into the consumer callback, as well as (at least) in the event queue consumer in `Broker`. Likely this will include development of queue pausing. \r\n\r\n","created_at":"2017-02-23T21:59:35Z","updated_at":"2017-02-23T23:42:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d8709b2af46a4e6d458e0e8f6213ab1d0567247","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/100health/redox-rabbit/pulls/2/commits","review_comments_url":"https://api.github.com/repos/100health/redox-rabbit/pulls/2/comments","review_comment_url":"https://api.github.com/repos/100health/redox-rabbit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/100health/redox-rabbit/issues/2/comments","statuses_url":"https://api.github.com/repos/100health/redox-rabbit/statuses/6085602c1dc2b65f45298457401cf0f5aadf2f13","head":{"label":"100health:refactor-producer","ref":"refactor-producer","sha":"6085602c1dc2b65f45298457401cf0f5aadf2f13","user":{"login":"100health","id":7266731,"avatar_url":"https://avatars.githubusercontent.com/u/7266731?v=3","gravatar_id":"","url":"https://api.github.com/users/100health","html_url":"https://github.com/100health","followers_url":"https://api.github.com/users/100health/followers","following_url":"https://api.github.com/users/100health/following{/other_user}","gists_url":"https://api.github.com/users/100health/gists{/gist_id}","starred_url":"https://api.github.com/users/100health/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/100health/subscriptions","organizations_url":"https://api.github.com/users/100health/orgs","repos_url":"https://api.github.com/users/100health/repos","events_url":"https://api.github.com/users/100health/events{/privacy}","received_events_url":"https://api.github.com/users/100health/received_events","type":"Organization","site_admin":false},"repo":{"id":82613205,"name":"redox-rabbit","full_name":"100health/redox-rabbit","owner":{"login":"100health","id":7266731,"avatar_url":"https://avatars.githubusercontent.com/u/7266731?v=3","gravatar_id":"","url":"https://api.github.com/users/100health","html_url":"https://github.com/100health","followers_url":"https://api.github.com/users/100health/followers","following_url":"https://api.github.com/users/100health/following{/other_user}","gists_url":"https://api.github.com/users/100health/gists{/gist_id}","starred_url":"https://api.github.com/users/100health/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/100health/subscriptions","organizations_url":"https://api.github.com/users/100health/orgs","repos_url":"https://api.github.com/users/100health/repos","events_url":"https://api.github.com/users/100health/events{/privacy}","received_events_url":"https://api.github.com/users/100health/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/100health/redox-rabbit","description":"Modules for managing ordered queues with RabbitMQ","fork":false,"url":"https://api.github.com/repos/100health/redox-rabbit","forks_url":"https://api.github.com/repos/100health/redox-rabbit/forks","keys_url":"https://api.github.com/repos/100health/redox-rabbit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/100health/redox-rabbit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/100health/redox-rabbit/teams","hooks_url":"https://api.github.com/repos/100health/redox-rabbit/hooks","issue_events_url":"https://api.github.com/repos/100health/redox-rabbit/issues/events{/number}","events_url":"https://api.github.com/repos/100health/redox-rabbit/events","assignees_url":"https://api.github.com/repos/100health/redox-rabbit/assignees{/user}","branches_url":"https://api.github.com/repos/100health/redox-rabbit/branches{/branch}","tags_url":"https://api.github.com/repos/100health/redox-rabbit/tags","blobs_url":"https://api.github.com/repos/100health/redox-rabbit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/100health/redox-rabbit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/100health/redox-rabbit/git/refs{/sha}","trees_url":"https://api.github.com/repos/100health/redox-rabbit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/100health/redox-rabbit/statuses/{sha}","languages_url":"https://api.github.com/repos/100health/redox-rabbit/languages","stargazers_url":"https://api.github.com/repos/100health/redox-rabbit/stargazers","contributors_url":"https://api.github.com/repos/100health/redox-rabbit/contributors","subscribers_url":"https://api.github.com/repos/100health/redox-rabbit/subscribers","subscription_url":"https://api.github.com/repos/100health/redox-rabbit/subscription","commits_url":"https://api.github.com/repos/100health/redox-rabbit/commits{/sha}","git_commits_url":"https://api.github.com/repos/100health/redox-rabbit/git/commits{/sha}","comments_url":"https://api.github.com/repos/100health/redox-rabbit/comments{/number}","issue_comment_url":"https://api.github.com/repos/100health/redox-rabbit/issues/comments{/number}","contents_url":"https://api.github.com/repos/100health/redox-rabbit/contents/{+path}","compare_url":"https://api.github.com/repos/100health/redox-rabbit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/100health/redox-rabbit/merges","archive_url":"https://api.github.com/repos/100health/redox-rabbit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/100health/redox-rabbit/downloads","issues_url":"https://api.github.com/repos/100health/redox-rabbit/issues{/number}","pulls_url":"https://api.github.com/repos/100health/redox-rabbit/pulls{/number}","milestones_url":"https://api.github.com/repos/100health/redox-rabbit/milestones{/number}","notifications_url":"https://api.github.com/repos/100health/redox-rabbit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/100health/redox-rabbit/labels{/name}","releases_url":"https://api.github.com/repos/100health/redox-rabbit/releases{/id}","deployments_url":"https://api.github.com/repos/100health/redox-rabbit/deployments","created_at":"2017-02-20T23:24:56Z","updated_at":"2017-02-23T14:06:17Z","pushed_at":"2017-02-23T21:59:35Z","git_url":"git://github.com/100health/redox-rabbit.git","ssh_url":"git@github.com:100health/redox-rabbit.git","clone_url":"https://github.com/100health/redox-rabbit.git","svn_url":"https://github.com/100health/redox-rabbit","homepage":"","size":21,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"100health:master","ref":"master","sha":"db65bf8d1cdc29e0f899e8ce485925f3def815c0","user":{"login":"100health","id":7266731,"avatar_url":"https://avatars.githubusercontent.com/u/7266731?v=3","gravatar_id":"","url":"https://api.github.com/users/100health","html_url":"https://github.com/100health","followers_url":"https://api.github.com/users/100health/followers","following_url":"https://api.github.com/users/100health/following{/other_user}","gists_url":"https://api.github.com/users/100health/gists{/gist_id}","starred_url":"https://api.github.com/users/100health/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/100health/subscriptions","organizations_url":"https://api.github.com/users/100health/orgs","repos_url":"https://api.github.com/users/100health/repos","events_url":"https://api.github.com/users/100health/events{/privacy}","received_events_url":"https://api.github.com/users/100health/received_events","type":"Organization","site_admin":false},"repo":{"id":82613205,"name":"redox-rabbit","full_name":"100health/redox-rabbit","owner":{"login":"100health","id":7266731,"avatar_url":"https://avatars.githubusercontent.com/u/7266731?v=3","gravatar_id":"","url":"https://api.github.com/users/100health","html_url":"https://github.com/100health","followers_url":"https://api.github.com/users/100health/followers","following_url":"https://api.github.com/users/100health/following{/other_user}","gists_url":"https://api.github.com/users/100health/gists{/gist_id}","starred_url":"https://api.github.com/users/100health/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/100health/subscriptions","organizations_url":"https://api.github.com/users/100health/orgs","repos_url":"https://api.github.com/users/100health/repos","events_url":"https://api.github.com/users/100health/events{/privacy}","received_events_url":"https://api.github.com/users/100health/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/100health/redox-rabbit","description":"Modules for managing ordered queues with RabbitMQ","fork":false,"url":"https://api.github.com/repos/100health/redox-rabbit","forks_url":"https://api.github.com/repos/100health/redox-rabbit/forks","keys_url":"https://api.github.com/repos/100health/redox-rabbit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/100health/redox-rabbit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/100health/redox-rabbit/teams","hooks_url":"https://api.github.com/repos/100health/redox-rabbit/hooks","issue_events_url":"https://api.github.com/repos/100health/redox-rabbit/issues/events{/number}","events_url":"https://api.github.com/repos/100health/redox-rabbit/events","assignees_url":"https://api.github.com/repos/100health/redox-rabbit/assignees{/user}","branches_url":"https://api.github.com/repos/100health/redox-rabbit/branches{/branch}","tags_url":"https://api.github.com/repos/100health/redox-rabbit/tags","blobs_url":"https://api.github.com/repos/100health/redox-rabbit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/100health/redox-rabbit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/100health/redox-rabbit/git/refs{/sha}","trees_url":"https://api.github.com/repos/100health/redox-rabbit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/100health/redox-rabbit/statuses/{sha}","languages_url":"https://api.github.com/repos/100health/redox-rabbit/languages","stargazers_url":"https://api.github.com/repos/100health/redox-rabbit/stargazers","contributors_url":"https://api.github.com/repos/100health/redox-rabbit/contributors","subscribers_url":"https://api.github.com/repos/100health/redox-rabbit/subscribers","subscription_url":"https://api.github.com/repos/100health/redox-rabbit/subscription","commits_url":"https://api.github.com/repos/100health/redox-rabbit/commits{/sha}","git_commits_url":"https://api.github.com/repos/100health/redox-rabbit/git/commits{/sha}","comments_url":"https://api.github.com/repos/100health/redox-rabbit/comments{/number}","issue_comment_url":"https://api.github.com/repos/100health/redox-rabbit/issues/comments{/number}","contents_url":"https://api.github.com/repos/100health/redox-rabbit/contents/{+path}","compare_url":"https://api.github.com/repos/100health/redox-rabbit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/100health/redox-rabbit/merges","archive_url":"https://api.github.com/repos/100health/redox-rabbit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/100health/redox-rabbit/downloads","issues_url":"https://api.github.com/repos/100health/redox-rabbit/issues{/number}","pulls_url":"https://api.github.com/repos/100health/redox-rabbit/pulls{/number}","milestones_url":"https://api.github.com/repos/100health/redox-rabbit/milestones{/number}","notifications_url":"https://api.github.com/repos/100health/redox-rabbit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/100health/redox-rabbit/labels{/name}","releases_url":"https://api.github.com/repos/100health/redox-rabbit/releases{/id}","deployments_url":"https://api.github.com/repos/100health/redox-rabbit/deployments","created_at":"2017-02-20T23:24:56Z","updated_at":"2017-02-23T14:06:17Z","pushed_at":"2017-02-23T21:59:35Z","git_url":"git://github.com/100health/redox-rabbit.git","ssh_url":"git@github.com:100health/redox-rabbit.git","clone_url":"https://github.com/100health/redox-rabbit.git","svn_url":"https://github.com/100health/redox-rabbit","homepage":"","size":21,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/100health/redox-rabbit/pulls/2"},"html":{"href":"https://github.com/100health/redox-rabbit/pull/2"},"issue":{"href":"https://api.github.com/repos/100health/redox-rabbit/issues/2"},"comments":{"href":"https://api.github.com/repos/100health/redox-rabbit/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/100health/redox-rabbit/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/100health/redox-rabbit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/100health/redox-rabbit/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/100health/redox-rabbit/statuses/6085602c1dc2b65f45298457401cf0f5aadf2f13"}}}}
{"actor":{"display_login":"tobalsgithub"}}