Firstly add a groupid and group sequence to message reference, this will be set on send
similar to how scheduled delivery time is set. (theres a todo in ServerSessionImpl::send
to do with duplicate code which i'll fix whilst I'm doing this)
Create a new interface and impl for controlling the delivery of grouped messages,
we'll call this GroupedMessageHandler. This will maintain what messages are in transit
for each group, it wll have a method canDeliver(MessageReference ref) that will return
true if the message can be delivered, i.e., the consumer has acked the last reference sent
and the group seq if this reference is the next in sequence. The deliver method of
QueueImpl will use the GroupMessageHandler to decide if what messages can be delivered to
the consumer and also notify it of each acknowledgment.
I don't think it makes sense for a queue to handle messages that are both grouped and
non grouped so a flag can be added to specify tjhat a queue is handling grouped messages
only. If a queue is 'enableGroupOrdering' the it should ignore any messages routed
that don't have the groupid and seq set and also disallow message scheduling.
When creating a core producer it should be possible to set its groupid to an arbitrary
string and allow it to set the sequence automatically or let the user set it via the
message itself.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193751#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...