8000 Always missing the first message on a UDP stream · Issue #435 · aeron-io/aeron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Always missing the first message on a UDP stream #435
Closed
@bedding

Description

@bedding

Hello,

Recently I had issues with connectivity between multiple machines so I ran the SimplePublisher and SimpleSubscriber to test out if my udp channel configuration was right.

SimplePublisher and SimpleSubscriber were started from different boxes with media drivers running on both machines. I started SimpleSubscriber first, then SimplePublisher. I turned on debug log to make sure that I didn't encountered problems like passing in the wrong endpoint. However, when I kicked out the SimplePublisher, it always exited immediately without the 5s wait as being said in the sample code with the following message,

Publishing to aeron:udp?endpoint=<ip-address>:8156 on stream Id 10
 Offer failed because publisher is not connected to subscriber
Done sending

And I also tried to run them from the same machine with each connecting to different media drivers to make sure that there is no firewall issue, but this still happened.

Then I switched over to run BasicPublisher and BasicSubscriber, which will keep sending messages. I started BasicSubscriber before BasicPublisher as well for this test. And this time I was surprised that they worked fine. However, the first message from the publisher is not sent because "publisher is not connected to subscriber".

Publishing to aeron:udp?endpoint=localhost:40123 on stream Id 10
Offering 0/1000000 - Offer failed because publisher is not connected to subscriber
No active subscribers detected -> The subscriber is listening on the channel, why?
Offering 1/1000000 - yay!
Offering 2/1000000 - yay!
Offering 3/1000000 - yay!
Offering 4/1000000 - yay!
Offering 5/1000000 - yay!
Offering 6/1000000 - yay!
Offering 7/1000000 - yay!
Offering 8/1000000 - yay!
Offering 9/1000000 - yay!
Offering 10/1000000 - yay!
Offering 11/1000000 - yay!
Offering 12/1000000 - yay!
...

My understanding was that if the subscriber is listening on a stream before a publication connected, the publication should always be able to detect that active subscriber when it's initialized. And this seems to be true with IPC stream. I am wondering if it should also be true on UDP or I'm making a wrong assumption here?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0