code: public synchronized void receiveMessagesSyncronously(long ms) throws ServiceGroundingException
      {
          for (IChannelConsumer chConsumer : this.serviceChannelConsumers)
          {
              if (chConsumer instanceof AbstractJMSChannelConsumer)
              {
                  AbstractJMSChannelConsumer achConsumer = (AbstractJMSChannelConsumer) chConsumer;
                  achConsumer.receiveOrWait(ms);
              }
              if (chConsumer instanceof AbstractStompChannelConsumer)
              {
                  AbstractStompChannelConsumer achConsumer = (AbstractStompChannelConsumer) chConsumer;
                  achConsumer.receiveOrWait(ms);
              }
          }
      }
docs: /*
  Set this broker object to receive messages during a given period of time, blocking execution.