{"action":"closed","issue":{"url":"https://api.github.com/repos/javaee/jms-spec/issues/85","repository_url":"https://api.github.com/repos/javaee/jms-spec","labels_url":"https://api.github.com/repos/javaee/jms-spec/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/javaee/jms-spec/issues/85/comments","events_url":"https://api.github.com/repos/javaee/jms-spec/issues/85/events","html_url":"https://github.com/javaee/jms-spec/issues/85","id":225649333,"number":85,"title":"Clarify how Message.receiveNoWait() is expected to behave","user":{"login":"glassfishrobot","id":6104758,"avatar_url":"https://avatars0.githubusercontent.com/u/6104758?v=4","gravatar_id":"","url":"https://api.github.com/users/glassfishrobot","html_url":"https://github.com/glassfishrobot","followers_url":"https://api.github.com/users/glassfishrobot/followers","following_url":"https://api.github.com/users/glassfishrobot/following{/other_user}","gists_url":"https://api.github.com/users/glassfishrobot/gists{/gist_id}","starred_url":"https://api.github.com/users/glassfishrobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glassfishrobot/subscriptions","organizations_url":"https://api.github.com/users/glassfishrobot/orgs","repos_url":"https://api.github.com/users/glassfishrobot/repos","events_url":"https://api.github.com/users/glassfishrobot/events{/privacy}","received_events_url":"https://api.github.com/users/glassfishrobot/received_events","type":"User","site_admin":false},"labels":[{"id":596184113,"url":"https://api.github.com/repos/javaee/jms-spec/labels/Priority:%20Major","name":"Priority: Major","color":"c402ef","default":false},{"id":596184123,"url":"https://api.github.com/repos/javaee/jms-spec/labels/Type:%20Improvement","name":"Type: Improvement","color":"082da5","default":false},{"id":596187504,"url":"https://api.github.com/repos/javaee/jms-spec/labels/jms21-forreview-minor","name":"jms21-forreview-minor","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2012-03-09T18:27:53Z","updated_at":"2018-02-12T18:30:44Z","closed_at":"2018-02-12T18:30:44Z","author_association":"CONTRIBUTOR","body":"The javadoc for the <tt>java.jms.MessageConsumer</tt> method <tt>receiveNoWait()</tt> states that this method \"Receives the next message if one is immediately available.\"\n\nSeveral, if not most, JMS providers interpret the meaning of \"immediately\" (and \"no wait\") literally and only return a message is one is already available on the client. They do not attempt to contact the server to fetch a message from the server, even if there is one available.\n\nThis means that the effect of calling <tt>receiveNoWait()</tt> is unpredictable and experience suggests that developers are best advised never to use it.\n\nIt is proposed that the behaviour of this method should be clarified to state what it says above, and to recommend the use of the other receive methods in most cases.\n\n_Edit_ Following comments, this issue has been broadened to consider all possible interpretations of this method. See [below](#action_366528)\n#### Affected Versions\n[1.1, 2.0]"}}
{"actor":{"display_login":"glassfishrobot"}}