Hi,

In MB 2.1.0 and also in MB 2.1.1 when purging messages of a queue from UI,
we used the following approach.

1. When purge is click for a particular queue we start a JMS AUTO_ACK
consumer. It will listen to all the messages and ack to the server.
2. When acked messages are removed.

But, in fact, above approach had many flows on its own. It was not reliable
when we have a lot of messages. Also it was a time consuming task when
there is a lot of messages.

Thus from MB 2.2.0 onwards we are introducing following steps to delete
messages of a queue when purging clusterwide.

1. Say there is a MB cluster of nodes MB1, MB2, MB3.
2. We go to the UI of MB2 and click purge on queue foo.
3. Then it will

      >>delete all messages addressed to foo sweeping through messages
(1000 at a time) in              Global Queue.
      >> delete metadata and schedule to delete content.
      >> send notifications to all nodes to purge messages addressed to
queue foo from their              Node Queues
4. Handling the notification each node will perform a search in their
respective node queues for messages addressed to foo and delete.

5. In that way all messages addressed to foo will be removed from cluster.

This change is already committed to relevant components/stubs/dependencies.

Thanks.

-- 
*Hasitha Abeykoon*
Software Engineer; WSO2, Inc.; http://wso2.com
*cell:* *+94 719363063*
*blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to