> For the complete documentation index, see [llms.txt](https://docs.frends.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frends.com/tasks/tasks/rabbitmq/publish.md).

# Publish

Task version: 1.11.0

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.RabbitMQ>

## Task Parameters

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

| Name                     | Description                                                                                                                                                                                                                          |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| InputType : `InputType`  | <p>Data input type.</p><p>Possible values:</p><ul><li><code>String</code>: Data input type.</li><li><code>ByteArray</code>: Data input type.</li></ul><p><br>Default: <code>-</code><br>Example: <code>String, Byte Array</code></p> |
| DataByteArray : `Byte[]` | <p>Data payload in byte array format.</p><p><br>Default: <code>-</code><br>Example: <code>54 65 73 74 20 6d 65 73 73 61 67 65</code></p>                                                                                             |
| DataString : `String`    | <p>Data payload in string format.</p><p><br>Default: <code>-</code><br>Example: <code>Test message</code></p>                                                                                                                        |
| Headers : `Header[]`     | <p>List of headers to be added to the request.</p><p><br>Default: <code>-</code><br>Example: <code>foo, bar</code></p>                                                                                                               |
| {% endtab %}             |                                                                                                                                                                                                                                      |

{% tab title="Connection" %}

| Name                                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Timeout : `Int32`                                     | <p>Timeout setting for connection attempts. Value 0 indicates that the default value for the attempts should be used. Set value in seconds.</p><p><br>Default: <code>60</code><br>Example: <code>60</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| AuthenticationMethod : `AuthenticationMethod`         | <p>Authentication method: URI, hostname with username/password, or certificate.</p><p>Possible values:</p><ul><li><code>URI</code>: Authentication method: URI, hostname with username/password, or certificate.</li><li><code>Host</code>: Authentication method: URI, hostname with username/password, or certificate.</li><li><code>Certificate</code>: Authentication method: URI, hostname with username/password, or certificate.</li><li><code>CertificateWithCredentials</code>: Authentication method: URI, hostname with username/password, or certificate.</li></ul><p><br>Default: <code>-</code><br>Example: <code>URI</code></p>                                                                                                                                                                                                                            |
| 🗝Host : `String`                                     | <p>URI or hostname to connect to, depending of authentication method.</p><p><br>Default: <code>-</code><br>Example: <code>RabbitHost, amqp\://foo:bar\@localhost:1234</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Username : `String`                                   | <p>Username to use when authenticating to the server.</p><p><br>Default: <code>-</code><br>Example: <code>foo</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 🗝Password : `String`                                 | <p>Password to use when authenticating to the server.</p><p><br>Default: <code>-</code><br>Example: <code>bar</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Port : `Int32`                                        | <p>The port to connect on. Value 0 indicates that the default port for the protocol should be used.</p><p><br>Default: <code>-</code><br>Example: <code>0</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| SslProtocol : `SslProtocol`                           | <p>Specifies the SSL protocol used for the RabbitMQ connection. Use SslProtocol.None to allow the operating system to negotiate the most secure protocol available.</p><p>Possible values:</p><ul><li><code>None</code>: Specifies the SSL protocol used for the RabbitMQ connection. Use SslProtocol.None to allow the operating system to negotiate the most secure protocol available.</li><li><code>Tls12</code>: Specifies the SSL protocol used for the RabbitMQ connection. Use SslProtocol.None to allow the operating system to negotiate the most secure protocol available.</li><li><code>Tls13</code>: Specifies the SSL protocol used for the RabbitMQ connection. Use SslProtocol.None to allow the operating system to negotiate the most secure protocol available.</li></ul><p><br>Default: <code>-</code><br>Example: <code>SslProtocol.None</code></p> |
| CertificateSource : `CertificateSource`               | <p>Specifies the source from which the client certificate should be loaded.</p><p>Possible values:</p><ul><li><code>File</code>: Specifies the source from which the client certificate should be loaded.</li><li><code>Store</code>: Specifies the source from which the client certificate should be loaded.</li><li><code>Base64</code>: Specifies the source from which the client certificate should be loaded.</li><li><code>RawBytes</code>: Specifies the source from which the client certificate should be loaded.</li></ul><p><br>Default: <code>-</code><br>Example: <code>CertificateSource.File</code></p>                                                                                                                                                                                                                                                  |
| ClientCertificatePath : `String`                      | <p>Full file system path to a client certificate file (.pfx or .p12) used for TLS client‑certificate authentication.</p><p><br>Default: <code>-</code><br>Example: <code>C:\certs\client-auth.pfx</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 🗝ClientCertificatePassword : `String`                | <p>Password required to decrypt the certificate file. Needed for password‑protected .pfx/.p12 certificates.</p><p><br>Default: <code>-</code><br>Example: <code>MyStrongPassword123!</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| 🗝CertificateBase64 : `String`                        | <p>Base64‑encoded representation of a client certificate (.pfx or .p12).</p><p><br>Default: <code>-</code><br>Example: <code>MIIF2wIBAzCCB...</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| 🗝CertificateBytes : `Byte[]`                         | <p>Raw byte array containing a client certificate (.pfx or .p12).</p><p><br>Default: <code>-</code><br>Example: <code>byte\[] { 1, 2, 3, 4, 5 }</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| StoreThumbprint : `String`                            | <p>Thumbprint of a certificate stored in the Windows certificate store.</p><p><br>Default: <code>-</code><br>Example: <code>ab12cd34ef56ab78cd90ef12ab34cd56ef7890ab</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| CertificateStoreLocation : `CertificateStoreLocation` | <p>Windows certificate store location to search when loading a certificate by thumbprint.</p><p>Possible values:</p><ul><li><code>LocalMachine</code>: Windows certificate store location to search when loading a certificate by thumbprint.</li><li><code>CurrentUser</code>: Windows certificate store location to search when loading a certificate by thumbprint.</li></ul><p><br>Default: <code>-</code><br>Example: <code>CertificateStoreLocation.CurrentUser</code></p>                                                                                                                                                                                                                                                                                                                                                                                          |
| QueueName : `String`                                  | <p>The name of the queue. Leave empty to make the server generate a name.</p><p><br>Default: <code>-</code><br>Example: <code>SampleQueue</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ExchangeName : `String`                               | <p>Exchange's name.</p><p><br>Default: <code>-</code><br>Example: <code>SampleExchange</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| RoutingKey : `String`                                 | <p>Routing key's name.</p><p><br>Default: <code>-</code><br>Example: <code>route</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Create : `Boolean`                                    | <p>True to declare queue when publishing.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| AutoDelete : `Boolean`                                | <p>Should this queue be auto-deleted when its last consumer (if any) unsubscribes?</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Durable : `Boolean`                                   | <p>Should this queue will survive a broker restart?</p><p>Note that Quorum queue supports only Durable settings.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Quorum : `Boolean`                                    | <p>Should this queue be a quorum queue.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| VirtualHost : `String`                                | <p>RabbitMQ virtual host to connect to.</p><p><br>Default: <code>/</code><br>Example: <code>/</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ConnectionExpirationSeconds : `Int32`                 | <p>Time in seconds how long a connection will be left open for reuse after the execution.</p><p><br>Default: <code>30</code><br>Example: <code>60</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| AllowInvalidCertificate : `Boolean`                   | <p>Decide if the connection be allowed to use an invalid certificate.</p><p>NOTE: This is not recommended for production environments as it can expose the connection to man-in-the-middle attacks.</p><p>Use with caution and only in testing or development scenarios where security is not a concern.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| {% endtab %}                                          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

{% tab title="Options" %}

| Name                             | Description                                                                                                                    |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| ThrowErrorOnFailure : `Boolean`  | <p>Whether to throw an error on failure.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                |
| ErrorMessageOnFailure : `String` | <p>Overrides the error message on failure.</p><p><br>Default: <code>-</code><br>Example: <code>Custom error message</code></p> |
| {% endtab %}                     |                                                                                                                                |
| {% endtabs %}                    |                                                                                                                                |

## Task Result

| Name                                   | Description                                                                                                                    |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Success : `Boolean`                    | <p>Indicates if the task completed successfully.<br>Example: <code>true</code></p>                                             |
| DataFormat : `String`                  | <p>Published data format.<br>Example: <code>String</code></p>                                                                  |
| DataString : `String`                  | <p>Published data (message) in UTF8 string format.<br>Example: <code>Foo Bar</code></p>                                        |
| DataByteArray : `Byte[]`               | <p>Published data (message) in byte array format.<br>Example: <code>46 6f 6f 20 42 61 72</code></p>                            |
| Headers : `Dictionary<String, String>` | <p>Headers of the published message.<br>Example: <code>foo, bar</code></p>                                                     |
| Error : `Error`                        | <p>Error that occurred during task execution.<br>Example: <code>object { string Message, Exception AdditionalInfo }</code></p> |

## Task Changelog

Changelog for Task Frends.RabbitMQ.Publish.

### \[1.11.0] - 2026-04-26

#### Added

* Added new property `Connection.AllowInvalidCertificate` to allow invalid certificates.

### \[1.10.0] - 2026-04-13

#### Added

* Added Options class with ThrowErrorOnFailure and ErrorMessageOnFailure fields to control error handling behavior.

### \[1.9.0] - 2026-03-17

#### Fixed

* Added missing `Text` attribute to the `VirtualHost` property in Connection parameters to make it automatically use the Text mode instead of Expression mode.

### \[1.8.0] - 2026-02-23

#### Added

* Added CertificateWithCredentials authentication method that requires both a valid client certificate and username/password credentials to connect.
* Added VirtualHost field to Connection parameters to allow specifying a RabbitMQ virtual host. Defaults to "/".

### \[1.7.0] - 2026-02-06

#### Added

* New property: Result.Success.
* New feature: Certificate‑based authentication via `AuthenticationMethod.Certificate`, with new enums (`CertificateSource`, `SslProtocol`, `CertificateStoreLocation`) and connection properties (`ClientCertificatePath`, `ClientCertificatePassword`, `CertificateBase64`, `CertificateBytes`, `StoreThumbprint`, `CertificateStoreLocation`, `SslProtocol`, `CertificateSource`).

#### Changed

* Update RabbitMQ.Client from 7.0.0 to 7.2.0
* Update System.Runtime.Caching from 9.0.2 to 10.0.2

### \[1.6.0] - 2025-11-30

#### Fixed

* Fix the parallel connections issue.
* Fix the issue with binding unnamed queue.

### \[1.5.0] - 2025-02-14

#### Changed

* Update RabbitMQ.Client from 6.8.1 to 7.0.0
* Update System.Runtime.Caching from 8.0.0 to 9.0.2

### \[1.4.0] - 2024-09-12

#### Fixed

* Fixed issue with MemoryCache error `Index was outside the bounds of the array` by adding try - catch block and changing how cache key is formatted.

### \[1.3.0] - 2024-09-06

#### Fixed

* Fixed issue with simultaneous calls by storing connections to Memory.Cache.

### \[1.2.0] - 2023-03-14

#### Fixed

* Fixed issue with connections left open after task's execution by implementing IDisposable in Connectionhelper class.

#### Added

* Added support for quorum queues.
* \[Breaking] Added parameter for connection options to enable creating quorum queues.

### \[1.1.0] - 2023-02-23

#### Fixed

* Fixed NullReferenceException when no headers are defined for the input object.

### \[1.0.1] - 2022-10-12

#### Changed

* Unnecessary input check removed.

### \[1.0.0] - 2022-08-18

#### Added

* Initial implementation


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.frends.com/tasks/tasks/rabbitmq/publish.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
