Followup of #80
Currently the snmp input does not implement the stop method to release snmp4j resources by calling the Snmp#close method. After the #80 refactor this is tricky because we are now using singleton objects for either udp or tcp transports and close should only be called if no plugin is using the singleton object.
The potential problem is that if there are no more snmp inputs defined after some pipeline reloading for example, the snmp listener might still be active and associated resources not freed.
I am not sure if we should look into another strategy than the singleton pattern or add some reference counting to correctly call close.
Followup of #80 Currently the snmp input does not implement the
stop
method to release snmp4j resources by calling theSnmp#close
method. After the #80 refactor this is tricky because we are now using singleton objects for either udp or tcp transports andclose
should only be called if no plugin is using the singleton object.The potential problem is that if there are no more snmp inputs defined after some pipeline reloading for example, the snmp listener might still be active and associated resources not freed.
I am not sure if we should look into another strategy than the singleton pattern or add some reference counting to correctly call close.