Aeron Replaymerge永远不会合并
我的replaymerge
被困在状态from_live_join
中,然后由于没有进度而出现。它添加了无问题的实时目的地(我看到相应的订阅出现在Aeron-Stat中,onimageavailable
调用回调)。 最终它完全赶上了,但没有过渡到下一个状态。
进行了调查后,我发现有问题的检查在功能应该stopandremovereplay
其中> image.activetransportcount()> = 2
是错误的,因为image.activetransportcount()
停留在1
。如果不是为此,请检查replaymerge
将成功。
这是我的replaymerge
参数:
replayChannel = "aeron:udp"
replayDestination = "aeron:udp?endpoint=localhost:0"
liveDestination = "aeron:udp?endpoint=localhost:0|control=localhost:12345"
我已经尝试了Java客户端和C ++客户端。我想念什么?
编辑: 客户端上的Aeron-stat
给出了这样的外观:
42: 1 - rcv-local-sockaddr: 41 <some IP address>:54709
43: 452,985,472 - sub-pos: 24 -106708072 3000 aeron:udp?control-mode=manual @0
44: 452,985,472 - rcv-hwm: 28 -106708072 3000 aeron:udp?control-mode=manual
45: 452,985,472 - rcv-pos: 28 -106708072 3000 aeron:udp?control-mode=manual
46: 1 - rcv-local-sockaddr: 41 0.0.0.0:39238
47: 452,971,520 - sub-pos: 24 -106708098 3000 aeron:udp?control-mode=manual @452971520
48: 452,985,472 - rcv-hwm: 89 -106708098 3000 aeron:udp?control-mode=manual
49: 452,971,520 - rcv-pos: 89 -106708098 3000 aeron:udp?control-mode=manual
第一个驱动程序订阅来自replayDestination
。所有的数字都会如您期望的那样上升,就像普通的重播一样。
第二个是来自添加的livedestination
。一旦创建,它根本就不会赶上,这与我上面的初步评估相反。 sub-pos
和rcv-pos
被困在452971520的初始位置,但是rcv-hwm
与该位置一起上升重播订阅。这不是表明正在收到数据,但未在实时目的地订阅中阅读?
我注意到replaymerge#image
被简单地定义为,
image = subscription.imageBySessionId((int)replaySessionId);
因此我试图对sisscription
我传递给replaymerge
构造器,以便这两个图像都会在内部进行投票。那无济于事。
My ReplayMerge
gets stuck in state ATTEMPT_LIVE_JOIN
, then times out due to no progress. It adds the live destination with no issues (I see the corresponding subscription appear in aeron-stat and the onImageAvailable
callback is invoked). Eventually it catches up fully but doesn't transition to the next state.
After an investigation, I found that the problematic check is in function shouldStopAndRemoveReplay
where image.activeTransportCount() >= 2
is false because image.activeTransportCount()
stays at 1
. If it weren't for that check the ReplayMerge
would succeed.
Here are my ReplayMerge
parameters:
replayChannel = "aeron:udp"
replayDestination = "aeron:udp?endpoint=localhost:0"
liveDestination = "aeron:udp?endpoint=localhost:0|control=localhost:12345"
I've tried both the Java client and the C++ client. What am I missing?
EDIT: aeron-stat
on the client side gives looks like this:
42: 1 - rcv-local-sockaddr: 41 <some IP address>:54709
43: 452,985,472 - sub-pos: 24 -106708072 3000 aeron:udp?control-mode=manual @0
44: 452,985,472 - rcv-hwm: 28 -106708072 3000 aeron:udp?control-mode=manual
45: 452,985,472 - rcv-pos: 28 -106708072 3000 aeron:udp?control-mode=manual
46: 1 - rcv-local-sockaddr: 41 0.0.0.0:39238
47: 452,971,520 - sub-pos: 24 -106708098 3000 aeron:udp?control-mode=manual @452971520
48: 452,985,472 - rcv-hwm: 89 -106708098 3000 aeron:udp?control-mode=manual
49: 452,971,520 - rcv-pos: 89 -106708098 3000 aeron:udp?control-mode=manual
The first driver subscription is from the replayDestination
. All the numbers go up as you would expect, like a normal replay.
The second one is from the added liveDestination
. Once created it doesn't catch up at all, contrary to my initial assessment above. sub-pos
and rcv-pos
are stuck at the initial position of 452971520, but the rcv-hwm
goes up together with the position of the replay subscription. Doesn't this indicate that data is being received but not read on the live destination subscription?
I noticed that the ReplayMerge#image
is simply defined as
image = subscription.imageBySessionId((int)replaySessionId);
So I tried to instead poll the Subscription
I passed to the ReplayMerge
constructor so that both images would get polled internally. That did not help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我解决了我的问题(在传递给
replaymerge
是特定于会话ID。Aeron代码库中的文件replaymergetest.java可以使用它来
,以便将重播频道的会话ID设置为
publication
与TAGpublication_tag
关联的publication
。在出版媒体驱动程序和订阅媒体驱动程序的情况下,这也有效,但您仍然必须以某种方式将出版标签传达给订户,这可能会带来不便。因此,我要寻求的解决方案是从录制的记录描述符中获取会话ID要重播,在较早的时候,我发现使用
Aeronarchive#listrecordingsforuri
(或类似)发现录音。此gist 这是一个工作的显示了一个工作
Replaymerge 跨媒体。
I fixed my issue (encountered with this code) by ensuring the
replayChannel
passed to theReplayMerge
is session ID-specific.File ReplayMergeTest.java in the aeron codebase does it with
so that the session ID of the replay channel is set to be that of the
Publication
associated to tagPUBLICATION_TAG
. This works as well in the case where the publishing media driver and subscribing media driver are distinct but you still have to somehow communicate the Publication tag to the subscriber which might be inconvenient.So the solution I'll be going for is to take the session ID from the recording descriptor of the recording to be replayed, at the earlier point where I discover recordings with
AeronArchive#listRecordingsForUri
(or similar).This gist shows a working
ReplayMerge
across two media drivers.