Re: [jgroups-users] Callback for non delivered messages?
Questions/problems related to using JGroups <[email protected]> Tue, 31 Mar 2020 09:29:34 +0200
| Newsgroups | gmane.comp.java.javagroups.general |
|---|---|
| Message-ID | <mailman.51205.1585639792.1535.javagroups-users@lists.sourceforge.net> |
On 30.03.20 21:42, Questions/problems related to using JGroups wrote: > Thanks Bela > > I would define "delivery failure" as in, JGroups attempted to deliver a > message to Node X but never received an ACK or NACK for this specific > message. This is not possible, as JGroups continues to try to deliver a message M to any member P until the message has been delivered, or P died (1) or got partitioned away (2). In (1), in case P is restarted it will acquire the state (in case of a stateful application). This will include M (if any other member received it) and its effect on the state. If M was a unicast message, it won't get re-delivered. In (2), a merge will merge the subgroups into one, including the state. This doesn't apply to unicast messages such as M, either. > In my use case, i want to be notified of this failure to > deliver so that i can persist the message and reattempt delivery at a > later date or when Node X comes back online. Something like persistent JMS messages? Doesn't exist in JGroups. It could be implemented though in a separate protocol: * The sender of a message persists it in a shared DB * Every message carries a unique ID, every receiver sends an ACK for this ID back to the sender * When an ACK from all receivers (or a given receiver in the unicast case) has been received, the message will be deleted in the DB * On restart/merge, the coordinator sends the unacked messages to a joiner > On Mon, Mar 30, 2020 at 7:44 AM Questions/problems related to using > JGroups <[email protected] > <mailto:[email protected]>> wrote: > > > > On 27.03.20 19:22, Questions/problems related to using JGroups wrote: > > Is there an easy way I can get notification of delivery failure of a > > give message? > > What's a delivery failure? At the application level? You could use > RpcDispatcher and check RspList for failures (exceptions). Or use the > JChannel directly and send back ack messages which are collected and > checked by the sender. > > > Also related, Is Channel.send a blocking method? > > Not per se. However, send() can block in the following cases: > * The transport is TCP and the send blocks because of a full TCP > send-window > * Flow control (MFC/UFC) blocks because the receiver(s) don't send > enough credits back > > > _______________________________________________ > > javagroups-users mailing list > > [email protected] > <mailto:[email protected]> > > https://lists.sourceforge.net/lists/listinfo/javagroups-users > > > > -- > Bela Ban | http://www.jgroups.org > > > > _______________________________________________ > javagroups-users mailing list > [email protected] > <mailto:[email protected]> > https://lists.sourceforge.net/lists/listinfo/javagroups-users > > > > _______________________________________________ > javagroups-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/javagroups-users > -- Bela Ban | http://www.jgroups.org