RuedigerMoeller / fast-cast

hp low latency reliable multicast messaging
GNU Lesser General Public License v3.0
122 stars 17 forks source link

Single FastCast for both receiving and offering #3

Closed dmart28 closed 8 years ago

dmart28 commented 8 years ago

Hi there,

Why I can only use FastCast instance topic either for sending or receiving, but not both?

public void subscribe( SubscriberConf subsConf, FCSubscriber subscriber ) {
        ....
        if ( topicEntry.getPublisherConf() != null ) {
            throw new RuntimeException("already a sender registered at "+subsConf.getTopicId());
        }

Why this condition here, how publisher intersects with subscriber after all? Appreciate for answer.

dmart28 commented 8 years ago

OK, It seems registering subscriber first and publisher next works as workaround. But still, some explanation about such internal logic is very helpful.

RuedigerMoeller commented 8 years ago

Hi there, that's probably a bug, it was somehow never tested the other way around. In fact a sender always listens as it has to listen for retransmission requests. So in case there is no receiver, it installs one which makes the sanity check fail when later on adding a receiver :)

Thanks for the report.

RuedigerMoeller commented 8 years ago

it should be fixed ofc

RuedigerMoeller commented 8 years ago

actually lost messages as reported in your second issue might result from a sender not receiving retransmission packets .. will check tomorrow evening.

RuedigerMoeller commented 8 years ago

fixed with 3.10. cut+paste fail