real-logic / aeron

Efficient reliable UDP unicast, UDP multicast, and IPC message transport
Apache License 2.0
7.37k stars 888 forks source link

modify the generation method of replay token #1623

Closed WorkingChen closed 3 months ago

WorkingChen commented 3 months ago

Using random numbers as replay tokens may lead to token conflicts, introducing instability. I think it could be replaced with the aeron.nextCorrelationId() method. Alternatively, changing to the following code would also be safer.

image

vyazelenko commented 3 months ago

@WorkingChen Thanks for the report. This should be fixed in https://github.com/real-logic/aeron/commit/d548968156d6aada215c1f867fbdf8b07e1a6b23.