Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-2454

Documentation is wrong for ForkChannel creation / Initial messages on fork channel are lost

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 5.0.0.Alpha3, 4.2.1
    • 4.1.8
    • None

    Description

      The documentation at

      http://www.jgroups.org/manual/html/user-advanced.html#ForkChannelCreation

      has the following example:

      JChannel main_ch=new JChannel("/home/bela/udp.xml").name("A");
      ForkChannel fork_ch=new ForkChannel(main_ch, "lock", "fork-ch4",
                                          new CENTRAL_LOCK(), new STATS());
      fork_ch.connect("bla");
      main_ch.connect("cluster");
      

      This does not work as "fork_ch.connect" will throw an IllegalStateException because the main channel is not connected at that point.

      But if the connects are reversed, messages for the fork channel may arrive before the fork channel is fully established and cause warnings like

      Feb 20, 2020 6:15:37 PM org.jgroups.protocols.FORK$1 handleUnknownForkChannel
      WARNING: marian-20309: fork-channel for id=fork-ch4 not found; discarding message
      

      My application will send a message to every new member in the cluster on a specific fork channel (in ReceiverAdapter.viewAccepted). These message usually get lost. Is there an alternate pattern for that?

      I can provide example code if required.

      Attachments

        Activity

          People

            rhn-engineering-bban Bela Ban
            pms11 Mirko Streckenbach (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: