using UDP (mainly due to speed)
== poor decision making in this case. Let's consider some of the reasons UDP might be considered faster in relation to what you are doing, and the constraints that UDP imposes vs. TCP.
UDP is, in some cases, in theory, faster because it saves a bit on some [blah blah] IP level stuff. Great. However, you get what you pay for, and a couple of things you don't pay for with UDP are:
A persistent connection.
A consistent connection (i.e, one in which information arrives in the order in which it was sent).
But based on your spec, it seems to me you need both of those, so you are going to have to pay for them some other way.
You need #1 because you are accepting a continuing stream of data from a specific source. Using TCP, this is very straightforward: the client connects and starts sending. Using UDP, there is no continuing server<->client relationship, so the only way to decide what information belongs to whom is IP and MAC address, which is probably not a very robust method.
To compensate, you'll have to A) Add more data to each sample, identifying the client, and B) Do more userspace processing, to identify the owner of each piece of data.
You need #2 because there is (probably) no point in sampling data every two seconds if the time relationship is random (is sample A 2 seconds before sample B, or vice versa?). To compensate, you'll have to A) Add more data to each sample, indicating the time ordering, and B) Do more userspace processing of each piece, to order the samples correctly.
Use TCP.