Hi HasithaH,

According to a little reading i did with the amqp spec regarding topic
behavior (refer mail "Behavior of non-durable AMQP topics in MB 3.0.0") ;

   - We have control over how to implement message queues (stored queues)
   for an exchange. So, the decision to have one storage queue for multiple
   subscribers on the same node for a single non-durable topic is ours to make.


   - Temporary exchanges last until the server shuts-down. Lifecycle of a
   non-durable topic ends only in a server shut-down. (Subscribers can come
   and go)


   - Temporary message queues last until the server shuts-down. Lifecycle
   of a temporary message queue (like the one we use here) should therefore
   clear when the server shuts down.

Given above findings, spec-wise, it is okay for a new non-durable topic
subscriber to receive past messages of the topic. (valid for the current
server session). If consumers expect a subscriber to receive only new
messages, I feel that they should use durable topics. Correct me if I'm
wrong :)

-----------------------------------------------------------------------------------------------------------------------------------------------
There is also a solution (one approach), as we discussed, to use the
"subscriber-subscribed-timestamp" against "message-arrival-time" to block
messages coming from the past for that subscriber. (This could be done in
evaluateDeliveryRules method ? )

WDYT ?

Btw theres a jira related to this : https://wso2.org/jira/browse/MB-863 :)

Thanks







On Tue, Nov 25, 2014 at 6:11 PM, Hasitha Hiranya <hasit...@wso2.com> wrote:

> Hi,
>
> There is an identified concern on the $Subject.
>
> We are saving topic messages to durable store to share the messages across
> the nodes and prevent OOM.
>
> Consider following scenario
>
> 1. Sub1 >> subscribes to topic1 on MB1 node
> 2. Sub2 >> subscribes to topic1 on MB1 node
> 3. Sub3 >> subscribes to topic1 on MB1 node
>
> Sub1 closes.
> We cannot delete messages as messages are shared by all subscribers for
> topic1 (Sub2 and Sub3 are still alive)
>
> Now
>
> Sub4 >> subscribes to topic1 on MB1 node
>
> It will get above mentioned messages which we did not delete (we just send
> message to all relevant subs on the node).
>
> But as per topic behavior this should not happen. What would be possible
> solutions for this? In MB 2.2.0, we did not get this problem as messages
> were fire-and-forget (without considering acks, but in MB 3.0.0 we consider
> acks for topic messages).
>
> What would be the possible solutions?
>
> Thanks
> --
> *Hasitha Abeykoon*
> Senior Software Engineer; WSO2, Inc.; http://wso2.com
> *cell:* *+94 719363063*
> *blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>
>
>
> _______________________________________________
> Architecture mailing list
> Architecture@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Cheers,

Hasitha Amal De Silva
 Software Engineer
Mobile : 0772037426
Blog    : http://devnutshell.tumblr.com/
WSO2 Inc.: http://wso2.com ( lean.enterprise.middleware. )
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to