# Publish

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code:

{% tabs %}
{% tab title="Parameter: Input" %}

| Name                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ProjectID : `String`               | <p>The project ID.</p><p><br>Default: <code>-</code><br>Example: <code>my-project-123456</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| TopicID : `String`                 | <p>The topic ID.</p><p><br>Default: <code>-</code><br>Example: <code>my-topic</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 🗝ServiceAccountKeyJSON : `String` | <p>The JSON service account key that one can generate in the Google Cloud portal.</p><p><br>Default: <code>-</code><br>Example: <code>{ "type": "service\_account", "project\_id": "something", "private\_key\_id": "fdsafdsafdsalmnop12345678909876543212344", "private\_key": "-----BEGIN PRIVATE KEY-----\nMIIE.......Hw==\n-----END PRIVATE KEY-----\n", "client\_email": "<someone@something.iam.gserviceaccount.com>", "client\_id": "123456789012345678900", "auth\_uri": "<https://accounts.google.com/o/oauth2/auth>", "token\_uri": "<https://oauth2.googleapis.com/token>", "auth\_provider\_x509\_cert\_url": "<https://www.googleapis.com/oauth2/v1/certs>", "client\_x509\_cert\_url": "<https://www....nt.com>" }</code></p> |
| EnableMessageOrdering : `Boolean`  | <p>Whether to enable or disable message ordering using an ordering key.</p><p><br>Default: <code>False</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Messages : `Message[]`             | <p>One or more messages to publish to the topic.</p><p><br>Default: <code>-</code><br>Example: <code>\[ \[ { "attr1", "value1" }, { "attr2", "value2" } ], "foo", "bar" ]</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| {% endtab %}                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

{% tab title="Result: Result" %}

| Name                                    | Description                                                                                                                                                                                                                                                                                                                                                                      |
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| MessageIDs : `List<String>`             | <p>IDs of successfully sent messages.<br>Example: <code>{ "12345", "54321" }</code></p>                                                                                                                                                                                                                                                                                          |
| Errors : `List<MessagePublishingError>` | <p>Errors that occurred during sending of messages, if any.<br>Example: <code>{ 'Message that was not sent', 'Error that happened during message sending' }, { { "Attrubutes" = \[ { "Key": "attr1", "Value": "val1" }, { "Key": "attr2", "Value": "val2" } ] "Data" = "My message", "OrderingKey" = "Key1", }, "An error occurred while sending error to topic..." }</code></p> |
| {% endtab %}                            |                                                                                                                                                                                                                                                                                                                                                                                  |
| {% endtabs %}                           |                                                                                                                                                                                                                                                                                                                                                                                  |
