[MB 320] Enqueued and dequeued message counts

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[MB 320] Enqueued and dequeued message counts

Nirmal Fernando-3
Hi All,

Don't you think it's better to have enqueued and dequeued message counts in the MB UI against queues and total messages delivered to subscribers?


--

Thanks & regards,
Nirmal

Technical Lead, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/



_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [MB 320] Enqueued and dequeued message counts

Asanka Abeyweera
Hi Nirmal,

We are planning to include these metrics in MB4.

On Sun, Jan 21, 2018 at 11:04 PM, Nirmal Fernando <[hidden email]> wrote:
Hi All,

Don't you think it's better to have enqueued and dequeued message counts in the MB UI against queues and total messages delivered to subscribers?


--

Thanks & regards,
Nirmal

Technical Lead, WSO2 Inc.
Mobile: <a href="tel:+94%2071%20577%209733" value="+94715779733" target="_blank">+94715779733
Blog: http://nirmalfdo.blogspot.com/





--
Asanka Abeyweera
Associate Technical Lead
WSO2 Inc.

Phone: +94 712228648



_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [MB 320] Enqueued and dequeued message counts

Hasitha Hiranya
In reply to this post by Nirmal Fernando-3
Hi Nirmal,

Definitely it is a very essential and long waited feature. 
But MB 3.2.0 has limitations when come to clustered environment. 

1. If we use Hazelcast distributed data structure to keep the count, it is not reliable/cannot tolerate network splits and merge. 
2. We have same experience with distributed message counting with Cassandra. It stores the count in quorum number of nodes but as increases and decreases happens per node very fast counts were wrong at EOD. 
3. If we update count per message, number of messages to do between nodes to sync the count will be even higher, which does not work. 

So after moved to RDBMS, even there if we keep the count at DB field we need to update per message, which causes too many DB writes. 
If we update the count once per 1000 messages,

1. If two nodes needs to update the count, they need to coordinate and do it, otherwise there will be race conditions. 
2. what if 999 messages were delivered and subscription was closed? We need to update using a timeout thread. 
3. What if the node crashed all of a sudden before updating the db field? Counts will be wrong. 

Due to complications like above, we still did not do the implementation. For APIM throttling etc, some error margin or delay to update will be tolerable. But for a broker counts should be accurate and should reflect the current truth I think. 

This boils down to distributed counting problem (which is a research)

Thanks

On Sun, Jan 21, 2018 at 11:04 PM, Nirmal Fernando <[hidden email]> wrote:
Hi All,

Don't you think it's better to have enqueued and dequeued message counts in the MB UI against queues and total messages delivered to subscribers?


--

Thanks & regards,
Nirmal

Technical Lead, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/





--
Hasitha Abeykoon
Associate Technical LeadWSO2, Inc.; http://wso2.com


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [MB 320] Enqueued and dequeued message counts

Hasitha Hiranya
In reply to this post by Asanka Abeyweera
Hi Asanka,

Yes, for MB4 this is possible as it is all about Active/Passive rather Active/Active.

Thanks

On Sun, Jan 21, 2018 at 11:08 PM, Asanka Abeyweera <[hidden email]> wrote:
Hi Nirmal,

We are planning to include these metrics in MB4.

On Sun, Jan 21, 2018 at 11:04 PM, Nirmal Fernando <[hidden email]> wrote:
Hi All,

Don't you think it's better to have enqueued and dequeued message counts in the MB UI against queues and total messages delivered to subscribers?


--

Thanks & regards,
Nirmal

Technical Lead, WSO2 Inc.
Mobile: <a href="tel:+94%2071%20577%209733" value="+94715779733" target="_blank">+94715779733
Blog: http://nirmalfdo.blogspot.com/





--
Asanka Abeyweera
Associate Technical Lead
WSO2 Inc.

Phone: +94 712228648





--
Hasitha Abeykoon
Associate Technical LeadWSO2, Inc.; http://wso2.com


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [MB 320] Enqueued and dequeued message counts

Pamod Sylvester
Yes. What we were also discussing was to further categorize the messages sent to subscriptions by channel id. So in a queue etc we will be able to co-relate the dispatched message counts against the channel id as well. 

On Sun, Jan 21, 2018 at 11:25 PM, Hasitha Hiranya <[hidden email]> wrote:
Hi Asanka,

Yes, for MB4 this is possible as it is all about Active/Passive rather Active/Active.

Thanks

On Sun, Jan 21, 2018 at 11:08 PM, Asanka Abeyweera <[hidden email]> wrote:
Hi Nirmal,

We are planning to include these metrics in MB4.

On Sun, Jan 21, 2018 at 11:04 PM, Nirmal Fernando <[hidden email]> wrote:
Hi All,

Don't you think it's better to have enqueued and dequeued message counts in the MB UI against queues and total messages delivered to subscribers?


--

Thanks & regards,
Nirmal

Technical Lead, WSO2 Inc.
Mobile: <a href="tel:+94%2071%20577%209733" value="+94715779733" target="_blank">+94715779733
Blog: http://nirmalfdo.blogspot.com/





--
Asanka Abeyweera
Associate Technical Lead
WSO2 Inc.

Phone: <a href="tel:071%20222%208648" value="+94712228648" target="_blank">+94 712228648





--
Hasitha Abeykoon
Associate Technical LeadWSO2, Inc.; http://wso2.com




--
Pamod Sylvester 
WSO2 Inc.; http://wso2.com
cell: +94 77 7779495

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture