{"action":"opened","number":48,"pull_request":{"url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/pulls/48","id":29126565,"html_url":"https://github.com/budjb/grails-rabbitmq-native/pull/48","diff_url":"https://github.com/budjb/grails-rabbitmq-native/pull/48.diff","patch_url":"https://github.com/budjb/grails-rabbitmq-native/pull/48.patch","issue_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/issues/48","number":48,"state":"open","locked":false,"title":"Update RabbitMessageBuilder.groovy","user":{"login":"tamershahin","id":4905043,"avatar_url":"https://avatars.githubusercontent.com/u/4905043?v=3","gravatar_id":"","url":"https://api.github.com/users/tamershahin","html_url":"https://github.com/tamershahin","followers_url":"https://api.github.com/users/tamershahin/followers","following_url":"https://api.github.com/users/tamershahin/following{/other_user}","gists_url":"https://api.github.com/users/tamershahin/gists{/gist_id}","starred_url":"https://api.github.com/users/tamershahin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamershahin/subscriptions","organizations_url":"https://api.github.com/users/tamershahin/orgs","repos_url":"https://api.github.com/users/tamershahin/repos","events_url":"https://api.github.com/users/tamershahin/events{/privacy}","received_events_url":"https://api.github.com/users/tamershahin/received_events","type":"User","site_admin":false},"body":"If the resolve strategy is OWNER_FIRST the plugin cannot be used in controllers with cache-header plugin because it uses a closure like  this: \r\n\r\nwithCacheHeaders {\r\n\t\t\tetag {\r\n\t\t\t\tgetETag name: 'user', id: id\r\n\t\t\t}\r\n\t\t\tgenerate {\r\n\t\t\t\tdef result = new RabbitMessageBuilder().rpc {\r\n\t\t\t\t\t\texchange = 'core_rpc'\r\n\t\t\t\t\t\troutingKey = 'user.getUserData'\r\n\t\t\t\t\t\tbody = [id: id]\r\n\t\t\t\t\t\ttimeout = RabbitMessageBuilder.DEFAULT_TIMEOUT\r\n\t\t\t\t\t}\r\n\t\t\t\trenderResponse(result)\r\n\t\t\t\tcache 'short_term' // for history navigation (5 sec)\r\n\t\t\t}\r\n\t\t}\r\n\r\nIt needs to be DELEGATE_FIRST so the closure can refer to the RabbitMessageBuilder to write exchange and other properties.","created_at":"2015-02-11T20:43:09Z","updated_at":"2015-02-11T20:43:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/pulls/48/commits","review_comments_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/pulls/48/comments","review_comment_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/pulls/comments/{number}","comments_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/issues/48/comments","statuses_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/statuses/1d41d0806945b13970f61856c46caa9b4028bc87","head":{"label":"tamershahin:patch-1","ref":"patch-1","sha":"1d41d0806945b13970f61856c46caa9b4028bc87","user":{"login":"tamershahin","id":4905043,"avatar_url":"https://avatars.githubusercontent.com/u/4905043?v=3","gravatar_id":"","url":"https://api.github.com/users/tamershahin","html_url":"https://github.com/tamershahin","followers_url":"https://api.github.com/users/tamershahin/followers","following_url":"https://api.github.com/users/tamershahin/following{/other_user}","gists_url":"https://api.github.com/users/tamershahin/gists{/gist_id}","starred_url":"https://api.github.com/users/tamershahin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamershahin/subscriptions","organizations_url":"https://api.github.com/users/tamershahin/orgs","repos_url":"https://api.github.com/users/tamershahin/repos","events_url":"https://api.github.com/users/tamershahin/events{/privacy}","received_events_url":"https://api.github.com/users/tamershahin/received_events","type":"User","site_admin":false},"repo":{"id":30668619,"name":"grails-rabbitmq-native","full_name":"tamershahin/grails-rabbitmq-native","owner":{"login":"tamershahin","id":4905043,"avatar_url":"https://avatars.githubusercontent.com/u/4905043?v=3","gravatar_id":"","url":"https://api.github.com/users/tamershahin","html_url":"https://github.com/tamershahin","followers_url":"https://api.github.com/users/tamershahin/followers","following_url":"https://api.github.com/users/tamershahin/following{/other_user}","gists_url":"https://api.github.com/users/tamershahin/gists{/gist_id}","starred_url":"https://api.github.com/users/tamershahin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamershahin/subscriptions","organizations_url":"https://api.github.com/users/tamershahin/orgs","repos_url":"https://api.github.com/users/tamershahin/repos","events_url":"https://api.github.com/users/tamershahin/events{/privacy}","received_events_url":"https://api.github.com/users/tamershahin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tamershahin/grails-rabbitmq-native","description":"A Grails plugin that provides convenient RabbitMQ functionality using the native Java library for RabbitMQ.","fork":true,"url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native","forks_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/forks","keys_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/teams","hooks_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/hooks","issue_events_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/issues/events{/number}","events_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/events","assignees_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/assignees{/user}","branches_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/branches{/branch}","tags_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/tags","blobs_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/statuses/{sha}","languages_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/languages","stargazers_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/stargazers","contributors_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/contributors","subscribers_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/subscribers","subscription_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/subscription","commits_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/issues/comments/{number}","contents_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/contents/{+path}","compare_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/merges","archive_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/downloads","issues_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/issues{/number}","pulls_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/pulls{/number}","milestones_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/milestones{/number}","notifications_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/labels{/name}","releases_url":"https://api.github.com/repos/tamershahin/grails-rabbitmq-native/releases{/id}","created_at":"2015-02-11T20:39:43Z","updated_at":"2015-02-11T20:39:44Z","pushed_at":"2015-02-11T20:41:45Z","git_url":"git://github.com/tamershahin/grails-rabbitmq-native.git","ssh_url":"git@github.com:tamershahin/grails-rabbitmq-native.git","clone_url":"https://github.com/tamershahin/grails-rabbitmq-native.git","svn_url":"https://github.com/tamershahin/grails-rabbitmq-native","homepage":null,"size":2838,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"development"}},"base":{"label":"budjb:development","ref":"development","sha":"9976d823a9247253e84c55a1633cd1aaac3f6a64","user":{"login":"budjb","id":1370939,"avatar_url":"https://avatars.githubusercontent.com/u/1370939?v=3","gravatar_id":"","url":"https://api.github.com/users/budjb","html_url":"https://github.com/budjb","followers_url":"https://api.github.com/users/budjb/followers","following_url":"https://api.github.com/users/budjb/following{/other_user}","gists_url":"https://api.github.com/users/budjb/gists{/gist_id}","starred_url":"https://api.github.com/users/budjb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/budjb/subscriptions","organizations_url":"https://api.github.com/users/budjb/orgs","repos_url":"https://api.github.com/users/budjb/repos","events_url":"https://api.github.com/users/budjb/events{/privacy}","received_events_url":"https://api.github.com/users/budjb/received_events","type":"User","site_admin":false},"repo":{"id":13500748,"name":"grails-rabbitmq-native","full_name":"budjb/grails-rabbitmq-native","owner":{"login":"budjb","id":1370939,"avatar_url":"https://avatars.githubusercontent.com/u/1370939?v=3","gravatar_id":"","url":"https://api.github.com/users/budjb","html_url":"https://github.com/budjb","followers_url":"https://api.github.com/users/budjb/followers","following_url":"https://api.github.com/users/budjb/following{/other_user}","gists_url":"https://api.github.com/users/budjb/gists{/gist_id}","starred_url":"https://api.github.com/users/budjb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/budjb/subscriptions","organizations_url":"https://api.github.com/users/budjb/orgs","repos_url":"https://api.github.com/users/budjb/repos","events_url":"https://api.github.com/users/budjb/events{/privacy}","received_events_url":"https://api.github.com/users/budjb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/budjb/grails-rabbitmq-native","description":"A Grails plugin that provides convenient RabbitMQ functionality using the native Java library for RabbitMQ.","fork":false,"url":"https://api.github.com/repos/budjb/grails-rabbitmq-native","forks_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/forks","keys_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/teams","hooks_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/hooks","issue_events_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/issues/events{/number}","events_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/events","assignees_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/assignees{/user}","branches_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/branches{/branch}","tags_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/tags","blobs_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/statuses/{sha}","languages_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/languages","stargazers_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/stargazers","contributors_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/contributors","subscribers_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/subscribers","subscription_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/subscription","commits_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/issues/comments/{number}","contents_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/contents/{+path}","compare_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/merges","archive_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/downloads","issues_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/issues{/number}","pulls_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/pulls{/number}","milestones_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/milestones{/number}","notifications_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/labels{/name}","releases_url":"https://api.github.com/repos/budjb/grails-rabbitmq-native/releases{/id}","created_at":"2013-10-11T14:19:07Z","updated_at":"2015-02-10T04:37:45Z","pushed_at":"2015-02-10T04:37:45Z","git_url":"git://github.com/budjb/grails-rabbitmq-native.git","ssh_url":"git@github.com:budjb/grails-rabbitmq-native.git","clone_url":"https://github.com/budjb/grails-rabbitmq-native.git","svn_url":"https://github.com/budjb/grails-rabbitmq-native","homepage":null,"size":2838,"stargazers_count":5,"watchers_count":5,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":13,"mirror_url":null,"open_issues_count":7,"forks":13,"open_issues":7,"watchers":5,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/budjb/grails-rabbitmq-native/pulls/48"},"html":{"href":"https://github.com/budjb/grails-rabbitmq-native/pull/48"},"issue":{"href":"https://api.github.com/repos/budjb/grails-rabbitmq-native/issues/48"},"comments":{"href":"https://api.github.com/repos/budjb/grails-rabbitmq-native/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/budjb/grails-rabbitmq-native/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/budjb/grails-rabbitmq-native/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/budjb/grails-rabbitmq-native/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/budjb/grails-rabbitmq-native/statuses/1d41d0806945b13970f61856c46caa9b4028bc87"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}