Closed tom-wp closed 4 years ago
Hi @tom-wp What language binding are you using? In the Python and JavaScript connectors, this behaviour is already supported.
Hi @samuelraeburn I am using the Go connector. Looking at the JavaScript connector I see this is already implemented as a string that is passed into the connector write function.
Thank you for the pointers @samuelraeburn. I have this working in the Go connector as:
func (output *Output) Dispose() error {
paramsCStr := C.CString(`{"action":"dispose"}`)
defer C.free(unsafe.Pointer(paramsCStr))
C.RTIDDSConnector_write(unsafe.Pointer(output.connector.native), output.nameCStr, paramsCStr)
return nil
}
I will close off the issue here and add it to the Go connector.
It is possible to publish topic instances through the
RTIDDSConnector_write()
function but there is no equivalent function for disposing of a published instance. The lack of this feature currently prevents us from using this connector in our Go applications where other services watch for the removal of instances.This could be implemented through a similar interface, by setting the key values in the Output Instance structure, then calling
RTIDDSConnector_dispose()
.