I'm pretty sure this is the case in the code, but there's no way for `addMessageToBatch` to be called concurrently, right? If not, then using the immutable vector here is fine, otherwise it would need to be protected by a spin-lock + AtomicReference to ensure that one immutable vector doesn't overwrite the other reference when used concurrently. Just something to keep in mind when using vectors like this.