message: Send multiple ops in one rest call.
diff: @@ -29,8 +29,7 @@ export function create(
  const documentId = request.params.id;
  const clientId = moniker.choose();
  - const reqOp = request.body as IOperation;
  - console.log(JSON.stringify(reqOp));
  + const reqOps = request.body as IOperation[];
  const detail: IClient = {
  permission: [],
  @@ -45,6 +44,24 @@ export function create(
  const joinMessage = craftSystemMessage(tenantId, documentId, clientDetail);
  producer.send(joinMessage, tenantId, documentId);
  + let clSeqNum = 1;
  + for (const reqOp of reqOps) {
  + const op = craftOp(reqOp);
  + const opMessage = craftMessage(tenantId, documentId, clientId, JSON.stringify(op), clSeqNum++);
  + producer.send(opMessage, tenantId, documentId);
  + }
  +
  + // Send leave message.
  + const leaveMessage = craftSystemMessage(tenantId, documentId, clientId);
  + producer.send(leaveMessage, tenantId, documentId);
  +
  + response.status(200).json( {status: "Sent client join and leave"} );
  + });
  +
  + return router;
  +}
  +
  +function craftOp(reqOp: IOperation) {
  // Craft and send op
  const opContent = {
  key: reqOp.path,
  @@ -64,17 +81,8 @@ export function create(
  type: "op",
  },
  };
  - const opMessage = craftMessage(tenantId, documentId, clientId, JSON.stringify(op));
  - producer.send(opMessage, tenantId, documentId);
  -
  - // Send leave message.
  - const leaveMessage = craftSystemMessage(tenantId, documentId, clientId);
  - producer.send(leaveMessage, tenantId, documentId);
  - response.status(200).json( {status: "Sent client join and leave"} );
  - });
  -
  - return router;
  + return op;
  }
  // Back-compat: Replicate the same info in content, metadata, and data.
  @@ -117,9 +125,10 @@ function craftMessage(
  tenantId: string,
  documentId: string,
  clientId: string,
  - contents: string): core.IRawOperationMessage {
  + contents: string,
  + clientSequenceNumber: number): core.IRawOperationMessage {
  const operation: IDocumentMessage = {
  - clientSequenceNumber: 1,
  + clientSequenceNumber,
  contents,
  referenceSequenceNumber: -1,
  traces: [],
  