code: @SuppressWarnings("unchecked")
      public <T extends Command> T receiveCommand(String queueName,  int timeout, Class<T> type) {
          return (T) receiveCommand(queueName, timeout);
      }
docs: Receives a command from a queue synchronously. If this queue also has listeners, then commands will be distributed across
  all consumers.
  
  @param queueName name of queue
  @param timeout  timeout in milliseconds. If a command is not received during a timeout, this methods returns null.
  @param type expected class of a command
  @return command if found. If command not found, this method will block till a command is present in queue.
  
  @see {@link #receiveCommand(String, long)}