docs: protected int marshalMessagesToSameDestination(Address dest, Message[] buf, final int start_index, final int end_index,
                                                     int max_bundle_size) throws Exception {
          int num_msgs=0, bytes=0;
          for(int i=start_index; i != end_index; i=increment(i)) {
              Message msg=buf[i];
              if(msg != null && msg != NULL_MSG && Objects.equals(dest, msg.dest())) {
                  long msg_size=msg.size();
                  if(bytes + msg_size > max_bundle_size)
                      break;
                  bytes+=msg_size;
                  num_msgs++;
                  buf[i]=NULL_MSG;
                  msg.writeToNoAddrs(msg.src(), output, transport.getId());
              }
          }
          return num_msgs;
      }