[
http://jira.jboss.com/jira/browse/JBMESSAGING-275?page=all ]
Tim Fox updated JBMESSAGING-275:
--------------------------------
Priority: Critical (was: Major)
The way to do this is as follows:
The PrioritizedDeque has an iterator (untested) that I recently added.
Currently a Receiver returns null when it doesn't want to accept a reference,
therefore there is currently no way of distinguishing that it doesn't want to accept
the ref because it doesn't match a selector, or for some other reason (e.g. it's
full).
We need to know this extra information, so we should change the contract of handle() so it
returns an enum value rather than null 0=closed, 1=on match on selector etc.
Once we know this information, since now we push messages to receivers until no more or
accepted, instead if we push a message and all receivers return "no match on
selector" then the router should return this information to the channel in it's
return value, then the channel can use PrioritizedDeque iterator to work backwards from
the first item on the queue, trying them one by one until there are no more messages in
memory.
Initially I recommend we do not consider references paged to disc since this is a
significant complication and we also do not use indexes as yet.
Move Selector processing IN the Channel
---------------------------------------
Key: JBMESSAGING-275
URL:
http://jira.jboss.com/jira/browse/JBMESSAGING-275
Project: JBoss Messaging
Issue Type: Task
Components: Messaging Core
Reporter: Ovidiu Feodorov
Assigned To: Tim Fox
Priority: Critical
Fix For: 1.0.2
Original Estimate: 2 weeks
Remaining Estimate: 2 weeks
Currently, a consumer "arrests" a message that is being handled to it and
doesn't match the Selector. That means it returns an active Delivery for it, but it
doesn't forward the message to the client. This is because the consumer needs to be
able to receiver further messages coming after the non-matching message, and that may
potentially match the selector.
This is a poor solution that doesn't scale. We may end up with lots of non-matching
messages being "arrested" by a consumer, while they could just be simply
returned to the channel and forwarded to other potential consumers.
A possible (right) approach is to move selector processing in the Channel, so the message
is not even handled to the non-accepting cosumer. Review this and refactor.
--
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