我想知道爲什麼OpenDDS在刪除DataWriter時n次重發相同的最後一個數據n次(其中n是已發送的消息的數量)?爲什麼在刪除DataWriter時OpenDDS重新發送相同的最後一個數據
難道我錯過了特定QoS的影響嗎?
一個小測試的輸出我已經做:
Received data ! ID = 0 Text = Hello world !
Received data ! ID = 1 Text = Hello world !
Received data ! ID = 2 Text = Hello world !
Received data ! ID = 3 Text = Hello world !
Received data ! ID = 4 Text = Hello world !
Received data ! ID = 5 Text = Hello world !
Received data ! ID = 6 Text = Hello world !
Received data ! ID = 7 Text = Hello world !
Received data ! ID = 8 Text = Hello world !
Received data ! ID = 9 Text = Hello world !
Received data ! ID = 9 Text = Hello world !
Received data ! ID = 9 Text = Hello world !
Received data ! ID = 9 Text = Hello world !
Received data ! ID = 9 Text = Hello world !
Received data ! ID = 9 Text = Hello world !
Received data ! ID = 9 Text = Hello world !
Received data ! ID = 9 Text = Hello world !
Received data ! ID = 9 Text = Hello world !
Received data ! ID = 9 Text = Hello world !
Received data ! ID = 9 Text = Hello world !
我們清楚地看到在例如10發送了郵件,並通過DataReader的好評。然後,一旦DataWriter被刪除(或刪除期間?),出現10次重複收到的最後一條消息。
在打印樣本內容之前,您是否在'SampleInfo'上檢查了'valid_data'標誌? –
其實我沒有檢查這個標誌。在我的代碼中啓用此驗證我已經能夠過濾它,謝謝。然而,我已經找到了在互聯網上完整問題的答案...... – MSch8791