Sending a Heartbeat

Send a heartbeat to avoid consumer group timeouts in the Streaming service. A consumer group is a set of instances that coordinate to consume messages from all partitions in a stream.

For more information about consumer groups, including the automatic rebalancing process, see Using Consumer Groups.
  • This task can't be performed using the Console.
  • Use the oci streaming stream group heartbeat command and required parameters to send a heartbeat:

    oci streaming stream group heartbeat --stream-id <stream_OCID> --cursor <cursor> --endpoint <messages_endpoint>

    Your first heartbeat request should use the value returned when you created a group cursor. Each subsequent request should use the value returned in the previous response.

    For example:

    oci streaming stream group heartbeat --stream-id ocid1.stream.oc1.phx.exampleuniqueID --cursor examplecursorvalue --endpoint https://cell-1.streaming.us-phoenix-1.oci.oraclecloud.com
    {
      "data": {
        "value": "examplenextcursorvalue"
      }
    }

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

  • Run the ConsumerHeartbeat operation to send a heartbeat.