Creating a Cursor

Create a cursor in the Streaming service. A cursor is a pointer to a location in a stream. This location could be a pointer to a specific offset or time in a partition, or to a group's current location. Use a cursor to consume a stream.

For information about using cursors, see Using Consumer Groups and Using Individual Consumers.
  • This task can't be performed using the Console.
  • Use the oci streaming stream cursor create-cursor command and required parameters to create a cursor:

    oci streaming stream cursor create-cursor --stream-id <stream_OCID> --partition <partition> --type <cursor_type> --endpoint <messages_endpoint>

    For example:

    oci streaming stream cursor create-cursor --stream-id ocid1.stream.oc1.phx.exampleuniqueID --partition 0 --type TRIM_HORIZON --endpoint https://cell-1.streaming.us-phoenix-1.oci.oraclecloud.com
    {
      "data": {
        "value": "examplecursorvalue"
      }
    }

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the CreateCursor operation to create a cursor.