Hi Hemika,

In a scenario where there are multiple subscribers for a queue, when one of
the subscribers' hasRoomToAcceptMessages() fails, we're trying to deliver
the message to other subscribers for the same queue. With the proposed
flow, other subscribers will still get the message although one of the
subscribers rejected the message. Is this the expected behaviour?

Thanks,
Akalanka.

On Tue, Jul 5, 2016 at 12:33 AM, Hemika Kodikara <[email protected]> wrote:

> Hi All,
>
> Currently when a message is being rejected by a subscriber client, the
> client is able to delay returning the message to the server. This is done
> by setting the "AndesAckWaitTimeOut" system property.
>
> But the message cannot be delayed from the server side. I.E when a message
> rejected is received, the message is requeued straight away to the
> subscriber client.
>
> A delay should be able to added from the server side allowing the clients
> not being pushed with rejected messages.
>
> Solution is to have a configurable value in the broker.xml which applies a
> delay for each rejected message before being requeued.
>
> Each subscription(LocalSubscription) will have a delayed queue[1] which
> will store the rejected messages with the configuration value in
> broker.xml. When a rejected message is received, accepting new messages
> will be stopped from getting delivered to the client by using the
> LocalSubscription#hasRoomToAcceptMessages() method. New messages will only
> be accepted only when these rejected messages are accepted by the client or
> sent to the DLC.
>
> There will be a separate scheduled task which consists of subscriptions
> that has rejected messages. The scheduler will go through each of those
> subscriptions and deliver the messages to the outbound disruptor.
>
>
> ​
>
> See redmine for more details[2]
>
> [1] -
> https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/DelayQueue.html
> [2] - https://redmine.wso2.com/issues/5248
>
> Regards,
> Hemika
>
> Hemika Kodikara
> Software Engineer
> WSO2 Inc.
> lean . enterprise . middleware
> http://wso2.com
>
> Mobile : +94777688882
>



-- 
*Darshana Akalanka Pagoda Arachchi,*
*Software Engineer, WSO2*
*+94777118016*
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to