[jboss-jira] [JBoss JIRA] Commented: (JBMESSAGING-1141) QueueBrowser sees expired messages
Tim Fox (JIRA)
jira-events at lists.jboss.org
Tue Nov 6 11:25:45 EST 2007
[ http://jira.jboss.com/jira/browse/JBMESSAGING-1141?page=comments#action_12386217 ]
Tim Fox commented on JBMESSAGING-1141:
--------------------------------------
On this matter the JMS spec states:
"Clients should not receive messages that have expired; however, JMS does not
guarantee that this will not happen."
So technically this is allowable, and not a bug.
Although I agree with you we should really change the behaviour. :)
It's a very easy change.
Changing to feature request
> QueueBrowser sees expired messages
> ----------------------------------
>
> Key: JBMESSAGING-1141
> URL: http://jira.jboss.com/jira/browse/JBMESSAGING-1141
> Project: JBoss Messaging
> Issue Type: Bug
> Components: JMS Client Manager
> Affects Versions: 1.4.0.SP1
> Reporter: Carlo de Wolf
> Assigned To: Tim Fox
> Fix For: Stable branch
>
>
> When I send a message which almost immediately expires, a queue browser will still show the message.
> sender.send(message, DeliveryMode.NON_PERSISTENT, 4, 1);
> Thread.sleep(2000);
> QueueBrowser browser = session.createBrowser(queue);
> Enumeration e = browser.getEnumeration();
> List messages = CollectionsUtil.list(e);
> browser.close();
> if(messages.size() == 1)
> {
> QueueReceiver receiver = session.createReceiver(dlq);
> message = (TextMessage) receiver.receive(2000);
> assertNull(message);
> }
> else
> {
> assertEquals(0, messages.size());
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list