Re: [jgroups-users] Callback for non delivered messages?
Questions/problems related to using JGroups <[email protected]> Tue, 31 Mar 2020 14:46:14 -0400
| Newsgroups | gmane.comp.java.javagroups.general |
|---|---|
| Message-ID | <mailman.52113.1585680394.1535.javagroups-users@lists.sourceforge.net> |
--===============2395417025772913391== Content-Type: multipart/alternative; boundary="0000000000001b7eb105a22afcaa" --0000000000001b7eb105a22afcaa Content-Type: text/plain; charset="UTF-8" Hang on, assuming NAKACK2...I send a unicast message to node P who drops offline before the message arrives and it never comes back online, jgroups will continue to retransmit to that node forever? There's no retransmit limits or anything like that? On Tue, Mar 31, 2020 at 3:30 AM Questions/problems related to using JGroups <[email protected]> wrote: > > > 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 > > > > _______________________________________________ > javagroups-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/javagroups-users > --0000000000001b7eb105a22afcaa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hang on, assuming NAKACK2...I send a unicast message to no= de P who drops offline before the message arrives and it never comes back o= nline, jgroups will continue to retransmit to that node forever? There'= s no retransmit limits or anything like that?<br></div><br><div class=3D"gm= ail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Mar 31, 2020 at 3:= 30 AM Questions/problems related to using JGroups <<a href=3D"mailto:jav= [email protected]">[email protected]= </a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:= 0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">= <br> <br> On 30.03.20 21:42, Questions/problems related to using JGroups wrote:<br> > Thanks Bela<br> > <br> > I would define "delivery failure" as in, JGroups attempted t= o deliver a <br> > message to Node X but never received an ACK or NACK for this specific = <br> > message.<br> <br> This is not possible, as JGroups continues to try to deliver a message M <b= r> to any member P until the message has been delivered, or P died (1) or <br> got partitioned away (2).<br> <br> In (1), in case P is restarted it will acquire the state (in case of a <br> stateful application). This will include M (if any other member received <b= r> it) and its effect on the state. If M was a unicast message, it won't <= br> get re-delivered.<br> <br> In (2), a merge will merge the subgroups into one, including the state. <br= > This doesn't apply to unicast messages such as M, either.<br> <br> > In my use case, i want to be notified of this failure to <br> > deliver so that i can persist the message and reattempt delivery at a = <br> > later date or when Node X comes back online.<br> <br> Something like persistent JMS messages? Doesn't exist in JGroups. It <b= r> could be implemented though in a separate protocol:<br> * The sender of a message persists it in a shared DB<br> * Every message carries a unique ID, every receiver sends an ACK for <br> this ID back to the sender<br> * When an ACK from all receivers (or a given receiver in the unicast <br> case) has been received, the message will be deleted in the DB<br> * On restart/merge, the coordinator sends the unacked messages to a joiner<= br> <br> <br> <br> > On Mon, Mar 30, 2020 at 7:44 AM Questions/problems related to using <b= r> > JGroups <<a href=3D"mailto:[email protected]" = target=3D"_blank">[email protected]</a> <br> > <mailto:<a href=3D"mailto:[email protected]" t= arget=3D"_blank">[email protected]</a>>> wrote:<= br> > <br> > <br> > <br> >=C2=A0 =C2=A0 =C2=A0On 27.03.20 19:22, Questions/problems related to us= ing JGroups wrote:<br> >=C2=A0 =C2=A0 =C2=A0 > Is there an easy way I can get notification o= f delivery failure of a<br> >=C2=A0 =C2=A0 =C2=A0 > give message?<br> > <br> >=C2=A0 =C2=A0 =C2=A0What's a delivery failure? At the application l= evel? You could use<br> >=C2=A0 =C2=A0 =C2=A0RpcDispatcher and check RspList for failures (excep= tions). Or use the<br> >=C2=A0 =C2=A0 =C2=A0JChannel directly and send back ack messages which = are collected and<br> >=C2=A0 =C2=A0 =C2=A0checked by the sender.<br> > <br> >=C2=A0 =C2=A0 =C2=A0 > Also related, Is Channel.send a blocking meth= od?<br> > <br> >=C2=A0 =C2=A0 =C2=A0Not per se. However, send() can block in the follow= ing cases:<br> >=C2=A0 =C2=A0 =C2=A0* The transport is TCP and the send blocks because = of a full TCP<br> >=C2=A0 =C2=A0 =C2=A0send-window<br> >=C2=A0 =C2=A0 =C2=A0* Flow control (MFC/UFC) blocks because the receive= r(s) don't send<br> >=C2=A0 =C2=A0 =C2=A0enough credits back<br> > <br> >=C2=A0 =C2=A0 =C2=A0 > _____________________________________________= __<br> >=C2=A0 =C2=A0 =C2=A0 > javagroups-users mailing list<br> >=C2=A0 =C2=A0 =C2=A0 > <a href=3D"mailto:[email protected]= ceforge.net" target=3D"_blank">[email protected]</a><b= r> >=C2=A0 =C2=A0 =C2=A0<mailto:<a href=3D"mailto:javagroups-users@lists= .sourceforge.net" target=3D"_blank">[email protected]<= /a>><br> >=C2=A0 =C2=A0 =C2=A0 > <a href=3D"https://lists.sourceforge.net/list= s/listinfo/javagroups-users" rel=3D"noreferrer" target=3D"_blank">https://l= ists.sourceforge.net/lists/listinfo/javagroups-users</a><br> >=C2=A0 =C2=A0 =C2=A0 ><br> > <br> >=C2=A0 =C2=A0 =C2=A0-- <br> >=C2=A0 =C2=A0 =C2=A0Bela Ban | <a href=3D"http://www.jgroups.org" rel= =3D"noreferrer" target=3D"_blank">http://www.jgroups.org</a><br> > <br> > <br> > <br> >=C2=A0 =C2=A0 =C2=A0_______________________________________________<br> >=C2=A0 =C2=A0 =C2=A0javagroups-users mailing list<br> >=C2=A0 =C2=A0 =C2=A0<a href=3D"mailto:[email protected]= e.net" target=3D"_blank">[email protected]</a><br> >=C2=A0 =C2=A0 =C2=A0<mailto:<a href=3D"mailto:javagroups-users@lists= .sourceforge.net" target=3D"_blank">[email protected]<= /a>><br> >=C2=A0 =C2=A0 =C2=A0<a href=3D"https://lists.sourceforge.net/lists/list= info/javagroups-users" rel=3D"noreferrer" target=3D"_blank">https://lists.s= ourceforge.net/lists/listinfo/javagroups-users</a><br> > <br> > <br> > <br> > _______________________________________________<br> > javagroups-users mailing list<br> > <a href=3D"mailto:[email protected]" target=3D"_b= lank">[email protected]</a><br> > <a href=3D"https://lists.sourceforge.net/lists/listinfo/javagroups-use= rs" rel=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/list= s/listinfo/javagroups-users</a><br> > <br> <br> -- <br> Bela Ban | <a href=3D"http://www.jgroups.org" rel=3D"noreferrer" target=3D"= _blank">http://www.jgroups.org</a><br> <br> <br> <br> _______________________________________________<br> javagroups-users mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank"= >[email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/javagroups-users" r= el=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/lis= tinfo/javagroups-users</a><br> </blockquote></div> --0000000000001b7eb105a22afcaa-- --===============2395417025772913391== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============2395417025772913391== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ javagroups-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/javagroups-users --===============2395417025772913391==--