Multi threaded SNMP polling data comes back as null

We are using SNMP4J version 2.3.3. and the Agent also is 2.3.3.

We use it to poll multiple SNMP agents to do several get bulk of different OIDs. We are using SNMP version 2 based calls and UDP Transport mapper.

What we are seeing is when multiple requests are made we see several requests get a timeout or come back with null values.

We had Wireshark running and could see the data come back for the requested agent but still, the SNMP4J response did not pick it up.

The current idea I have tried is to increase the receive buffer size in the transport mapper to 20 MB. Then I also tried to use multithreaded message dispatcher thinking that might parallelize the data reads from the buffer. But still, we are still seeing some packets dropped.

So would like to know if there are other things that I am missing or doing wrong in a multi-threaded agent request. We don’t request multiple from the same agaent. To a single agent, it is only one thread. We just make parallel calls to different agents.

I can put the code that we use to do the polling if required.

A common error is to create and destroy a Snmp or TransportMapping instance for each request. The multi-threaded message dispatcher only prevents, that your asynchronous response handling blocks receiving other responses.