SNMP4J 2.8.6- TCP traps coming from different ips are lost

We have a java application (JDK version 1.8) which uses snm4j(2.8.6) library which consumes SNMPV3 traps which are sent to port 10118 and host interface 0.0.0.0 . but the application is able to read the traps from IP e.g 1.2.3.4:10118 but not from IP 9.8.7.5:10118 and these traps can be seen in tcpdump and all packets are valid. How to make the application listen to all the traps sent to port 10118 (from any host)

You cannot send a UDP message to IPv4 “0.0.0.0”. So what you describe is supposed to fail. (But maybe you meant that the SNMP4J based trap receiver is listening on 0.0.0.0/10118?)

Are the traps sent with noAuthNoPriv security level?

Yes the Java app is a listener and listening at 0.0.0.0:10118 and it is a TCP protocol with authpriv enabled (authentication model is md5 and privacy protocol AES).

need your suggestion here please.

Can you post a code snippet of your trapSender and trapReciever. The application which receives the traps should be able to receive any trap from any host, assuming that the trapSender has the correct target information set for the trapReciever.