Description
for each message we write...
super.writeUTF(msg.getJMSMessageID(), dataOut);
super.writeUTF(msg.getJMSClientID(), dataOut);
super.writeUTF(msg.getProducerID(), dataOut);
If we're using non-multicast, we know who the clientID is, since a clientID uses a single socket which has a ConnectionInfo sent before anything else. The producerID could be an int, which the BrokerClient turns into an object (String?) by appending it onto the clientID.
Similarly the messageID could be a long which is appended to the clientID? A message ID only really exists for 1 hop right, so once it hits the broker, it can use anything for the ID
Though if we're multicast, we still need to send the clientID, but we can send int/long for the other 2 fields and the MessageReader can read the ints and turn the MessageID and ProducerID into Strings again.
So we can have a boolean, that if we're multicast we send messageID otherwise we don't. Then use int/long for producerID, messageID and transform them back into Strings again at the MessageReader so no code breaks