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
_______________________________________________ Architecture mailing list Architecture@wso2.org https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture