If the server side receive buffer isn't read fast enough, the remaining messages are indeed lost: that is how UDP works.
If you just need to handle a burst of 10000 messages (and not cope with sustained traffic), you could just increase the buffer size: sysctl -w net.core.rmem_max=nnnnnnn
.
Alternatively start profiling where the time is spent in your server read loop. You could e.g. remove all the parsing and logging as a test, and just count the number of messages you receive: If that helps you reach a number closer to 10000, then it would imply the parsing and logging is too slow for that loop.
Another thing to check would be to look at which messages you are losing: if you get constant message-loss even in the early messages (e.g. in the first hundred messages) then that would imply that something else on the way cannot handle messages that fast -- the receive buffer on the server is not to blame in that case.