title: What exactly does sequenceNumberForOrdering do when putting records into a Kinesis stream with the Java SDK?
body: <p>I'm a bit confused about the AWS docs for putting records to Kinesis stream here: <a href="https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecord.html#API_PutRecord_RequestSyntax" rel="noreferrer">https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecord.html#API_PutRecord_RequestSyntax</a></p>
  
  <p>It says that setting <code>sequenceNumberForOrdering</code> should be used for guaranteeing order "for puts from the same client and to the same partition key".</p>
  
  <p>The example at the very bottom of <a href="https://docs.aws.amazon.com/streams/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream" rel="noreferrer">this page</a> is what confuses me:</p>
  
  <ol>
  <li>What should be the initial value of the variable
  <code>sequenceNumberOfPreviousRecord</code>in that example? <code>"0"</code>?</li>
  <li>Why does it not seem to matter for which partition key the previous record was put? (The loop in the example puts records for two different partition keys, 0 and 1.)</li>
  </ol>
  
  <p>Maybe I just don't get it, but I think the docs could do a better job of explaining this.</p>