Update Broker.java

Add first version of thread safe to getMessage it will be changed by ReentrantLock