Passing dds::domain::DomainParticipantListener to dds::domain::DomainParticipant does not listen for DataWriter events
Progeny42 opened this issue · 3 comments
I'm using tag v0.10.3.
When creating a dds::domain::DomainParticipant
, passing the ExampleListener
class as per the docs as the listener
parameter, and a StatusMask
of all()
, it appears that DataWriter callbacks are not being handled.
For example, I would expect to see on_publication_matched
being called.
From looking at CycloneDDS\include\ddscxx\org\eclipse\cyclonedds\domain\DomainParticipantDelegate.hpp
, there appears to only be handlers for DataReaderListener
events.
@e-hndrks is currently fixing some issues with listeners (#420 and eclipse-cyclonedds/cyclonedds#1717) and it would be good to see if this issue still exists with his work.
#420 and eclipse-cyclonedds/cyclonedds#1717 is to fix listener problem in subscriber.
This problem is in publisher and it still exists.
From DomainParticipantDelegate.hpp
, we can see the writer related listener callback is not implemented.
When set writer related listeners on Participant, the default implementation in EntityDelegate
will be called and will cause assert
.
cyclonedds-cxx/src/ddscxx/src/org/eclipse/cyclonedds/core/EntityDelegate.cpp
Lines 320 to 360 in d7d2578
Hi @binbowang1987, thanks for bringing this to our attention. The fact that Writer events didn't propagate all the way to the participant wasn't caused by the fix for #420, but has already been a bug since the initial commit of the C++ API, Due to the fact we didn't have a testcase covering this use-case, it went unnoticed until you ran into it.
I have created a pull request in #452 that should tackle this problem, in which I also added a testcase to cover this particular scenario.