public void publish(String topic,Message message){
  log.debug("Publishing topic {}, message {}",topic,message);
  ProtobufMessage proto=new ProtobufMessage(topic,message);
  while (!pending.offer(proto)) {
    pending.pollFirst();
  }
  selector.wakeup();
}

public void publish ( String topic , Message message ) { log . debug ( "Publishing topic {}, message {}" , topic , message ) ; ProtobufMessage proto = new ProtobufMessage ( topic , message ) ; while ( ! pending . offer ( proto ) ) { pending . pollFirst ( ) ; } selector . wakeup ( ) ; }
publish a message to the server
