The FreePastry Tutorial.

This tutorial is designed to get you cooking quickly with the FreePastry API and software toolkit.

Version @tutorial_version@; @tutorial_date@. For FreePastry version @freepastry_version@. Maintained by @maintainer@.

Cancellable Messages

Keep track of FreePastry's queue size, and optionally cancel pending messages.



This tutorial will show you how to keep track of your application's pending messages, and even cancel them.

This tutorial is currently a stub. The important new feature described here is that Endpoint.route() is overloaded so that now it takes a rice.p2p.commonapi.DeliveryNotification and returns a rice.p2p.commonapi.MessageReceipt.

You can keep track of how many messages are pending in the queue by storing a list of the MessageReceipts who haven't been acknowledged by calling DeliveryNotification.sent(). If this number gets too high, you can cancel stale messages by calling MessageReceipt.cancel(). You can also be notified of dropped messages because the transport layer will call DeliveryNotification.sendFailed().