Do I need to achieve a windows services to get custom metadata or get custom alarm

I need to arhieve to get custom metadata from our device. if i archieve this function in plug-ins, the function that getting custom metadata will be closed when i close the XProtect Management client. So I achieve a windows services to get custom metadata from device ,and use MIP SDK API to send to milestone server. Is there any interface can be used to achieve to get custom metadata and send custom metadata? I want to achieve a plug-in in milestone,not XProtet Management.

Currect, make a Windows service to run the MetadataProvider and related classes (as you write in other place). This service then listen to incomming TCP connect from the Recording Server - that runs the MIP Driver. The MIP Driver will connect to your service on the port specified in the user-interface.