> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloud Pub/Sub

export const designer = "Designer";

export const maia = "Maia";

export const ComponentMetadata = ({warehouses, unsupportedWarehouses = [], componentType, connectionInputs, connectionOutputs}) => {
  const allWarehouses = [...warehouses.map(w => ({
    name: w,
    supported: true
  })), ...unsupportedWarehouses.map(w => ({
    name: w,
    supported: false
  }))];
  return <div style={{
    background: 'var(--colors-background-light, #f9fafb)',
    border: '1px solid var(--colors-border-default, #e5e7eb)',
    borderRadius: '12px',
    padding: '20px 28px',
    marginBottom: '28px',
    boxShadow: '0 1px 4px rgba(0,0,0,0.10)'
  }}>
      <table style={{
    width: '100%',
    borderCollapse: 'collapse'
  }}>
        <tbody>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle',
    width: '180px'
  }}>Project Availability</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>
              <div style={{
    display: 'flex',
    flexWrap: 'wrap',
    gap: '8px'
  }}>
                {allWarehouses.map((w, i) => <span key={i} style={{
    background: w.supported ? '#dcfce7' : '#fee2e2',
    color: w.supported ? '#15803d' : '#b91c1c',
    border: `1px solid ${w.supported ? '#bbf7d0' : '#fca5a5'}`,
    borderRadius: '9999px',
    padding: '3px 12px',
    fontSize: '0.85rem',
    fontWeight: '500',
    whiteSpace: 'nowrap'
  }}>
                    {w.name} {w.supported ? '✅' : '❌'}
                  </span>)}
              </div>
            </td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Component Type</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{componentType}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Inputs</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{connectionInputs}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Outputs</td>
            <td style={{
    verticalAlign: 'middle'
  }}>{connectionOutputs}</td>
          </tr>
        </tbody>
      </table>
    </div>;
};

<ComponentMetadata warehouses={["Snowflake", "Databricks", "Amazon Redshift", "Google BigQuery"]} componentType="Orchestration, Test" connectionInputs="One" connectionOutputs="Unlimited" />

Cloud Pub/Sub is an orchestration component that allows messages to be published to a topic on Google Cloud. Other applications can subscribe to these topics to receive such messages.

To use this component, you need to add Google Cloud [credentials](/docs/guides/cloud-credentials) to your {maia} project. You then need to [associate your cloud provider credentials with an environment](/docs/guides/environments#associate-cloud-provider-credentials-with-an-environment) for {designer} to access your Google Cloud account.

To publish messages from {maia}, you must first ensure that topics are available to publish to (and ideally, that relevant applications are subscribed to these topics).

* If you're new to Cloud Pub/Sub, read [Overview of the Pub/Sub service](https://cloud.google.com/pubsub/docs/pubsub-basics).
* Read [Create a topic](https://cloud.google.com/pubsub/docs/create-topic) to get started with topics.

## Properties

<ResponseField name="Name" type="string" required>
  A human-readable name for the component.
</ResponseField>

{/* <!-- param-start:[project] | warehouses: [snowflake, databricks, redshift, bigquery] --> */}

<ResponseField name="Project" type="drop-down" required>
  Select the Google Cloud project. For more information, read [Creating and managing projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
</ResponseField>

{/* <!-- param-start:[topic] | warehouses: [snowflake, databricks, redshift, bigquery] --> */}

<ResponseField name="Topic" type="drop-down" required>
  The topic to publish to.
</ResponseField>

{/* <!-- param-start:[message] | warehouses: [snowflake, databricks, redshift, bigquery] --> */}

<ResponseField name="Message" type="string" required>
  The contents of the message.
</ResponseField>

{/* <!-- param-start:[attributes] | warehouses: [snowflake, databricks, redshift, bigquery] --> */}

<ResponseField name="Attributes" type="key:value">
  Assign key-value pairs to be included with the message to be used by the subscribed application. These may be data regarding the message itself.

  Click the **Text mode** toggle at the bottom of the dialog to open a multi-line editor that lets you add items in a single block. For more information, read [Text mode](/docs/guides/components-overview#text-mode).

  To use grid variables, toggle **Use Grid Variable** on at the bottom of the dialog. For more information, read [Grid variables](/docs/guides/grid-variables).
</ResponseField>
