During SNMP transactions, I noticed 3 sessions actually getting established.
And while closing connection as below,
I noticed only one session getting closed!
After checking snmp4j code for debugging, noticed that
TLSTM.sockets is single socketEntry per address.
private Map<Address, SocketEntry> sockets = new Hashtable<Address, SocketEntry>();
If so, can’t we have multiple session per targetAddress?
We dispatched 3 transactions almost same time, snmp4j logs showing looking up for connection but returned null (I think as socket entry is missing and checked at almost same time)
Thanks @AGENTPP
One query on threads in multithreaded dispatcher for TLS. Might be basic but getting the clarification
Are the threads asynchronous in nature that would be able to cater to multiple requests at the same time instead of waiting/blocked on the SNMP response to be received from SNMP client to which request is sent?
i.e., is there a blocking call (like socket read/write) involved?
Already the regular dispatcher is non-blocking. The only drawback of the regular dispatcher compared to the multi-threaded dispatcher is the following:
Regular dispatcher will wait to deliver/call the response listener for the next response after the current response listener returns.
The multi-threaded dispatcher will call response listeners concurrently (limited to the thread pool size).