> ## Documentation Index
> Fetch the complete documentation index at: https://hedera-0c6e0218-mintlify-bc559771.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Hedera Consensus Service gRPC API

> Stream Hedera Consensus Service topic messages from the public HCS gRPC mirror node API by subscribing to topics on mainnet, testnet, or previewnet.

<Warning>
  #### Important Notice: Deprecation of the Insecure Hedera Consensus Service (HCS) Mirror Node Endpoints

  We are phasing out the legacy Hedera Consensus Service (HCS) mirror node endpoints. The APIs have transitioned from the legacy *hcs*.

  `<env>.mirrornode.hedera.com:5600` endpoints to the new `<env>.mirrornode.hedera.com:443` endpoints.

  For more details, please read our [blog post announcement](https://hedera.com/blog/deprecation-of-the-insecure-hedera-consensus-service-hcs-mirror-node-endpoints).
</Warning>

<Info>
  **HCS Mirror Node Endpoints:**\
  **PREVIEWNET:** previewnet.mirrornode.hedera.com:443\
  **TESTNET**: testnet.mirrornode.hedera.com:443\
  **MAINNET**: mainnet.mirrornode.hedera.com:443
</Info>

<Warning>
  Requests for the public mainnet mirror node are throttled at 100 requests per second (rps). This may change in the future depending upon performance or security considerations. At this time, no authentication is required.
</Warning>

Community-supported mirror node information can be found here:

<Card title="Network Explorers and Tools" href="/learn/networks/community-mirror-nodes" />

## Build a Mirror Node Client

If you building your client with a predefined Hedera network (previewnet, testnet, mainnet), you do not need to define the mirror client as it is built in. If you would like to modify the mirror node client, you can use `Client.<network>.setMirrorNetwork(<network>)`.

<CodeGroup>
  ```java Java theme={null}
  // You will need to upgrade to v2.0.6 or higher
  Client client = Client.forMainnet();
  client.setMirrorNetwork(Collections.singletonList("mainnet.mirrornode.hedera.com:443"))
  ```

  ```javascript JavaScript theme={null}
  // You will need to upgrade to v2.0.23 or higher
  const client = Client.forMainnet()
  client.setMirrorNetwork("mainnet.mirrornode.hedera.com:443")
  ```

  ```go Go theme={null}
  hedera.ClientForMainnet()
  client.SetMirrorNetwork([]string{"mainnet.mirrornode.hedera.com:443"})
  ```
</CodeGroup>

<Warning>
  **Concurrent Subscription Limit**\
  A single client can make a maximum of **5** concurrent subscription calls per connection.
</Warning>

### Subscribe to a topic

Please click the link below to see how you can subscribe to a topic.

<Card title="Get Topic Message" href="/native/consensus/get-message" />
