# Send

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Unknown

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

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

| Name                                            | Description                                                                                                                                                                                                                                                    |
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Message : `AmqpMessage`                         | <p>AMQP message string.</p><p><br>Default: <code>-</code><br>Example: <code>Example message.</code></p>                                                                                                                                                        |
| QueueOrTopicName : `String`                     | <p>Name of target queue or topic.</p><p><br>Default: <code>-</code><br>Example: <code>Queue</code></p>                                                                                                                                                         |
| MessageProperties : `AmqpProperties`            | <p>The Immutable properties of the Message.</p><p><br>Default: <code>-</code><br>Example: <code>AbsoluteExpiryTime, ContentEncoding, ContentType, CorrelationId, CreationTime, GroupId, GroupSequence, ReplyToGroupId, ReplyTo, Subject, UserId, To</code></p> |
| ApplicationProperties : `ApplicationProperty[]` | <p>Application properties section of an AMQP messages.</p><p><br>Default: <code>-</code><br>Example: <code>foo, bar</code></p>                                                                                                                                 |
| {% endtab %}                                    |                                                                                                                                                                                                                                                                |

{% tab title="Parameter: Options" %}

| Name                             | Description                                                                                                                                                                                                                                                                                                                 |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Timeout : `Int32`                | <p>Timeout in seconds for receiving or sending Message to the queue.</p><p><br>Default: <code>30</code><br>Example: <code>30</code></p>                                                                                                                                                                                     |
| LinkName : `String`              | <p>Link name.</p><p><br>Default: <code>{{Guid.NewGuid().ToString()}}</code><br>Example: <code>9e2646fe-bbc7-482d-a5dc-679dc5caf951</code></p>                                                                                                                                                                               |
| ThrowErrorOnFailure : `Boolean`  | <p>Determines error handling behavior. If true, throws an exception when task fails.</p><p>If false, returns error information in the Result object instead of throwing.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                             |
| ErrorMessageOnFailure : `String` | <p>Custom error message to use when ThrowErrorOnFailure is false and an error occurs.</p><p>If null or empty, the original exception message will be used.</p><p>This allows for user-friendly error messages in automated workflows.</p><p><br>Default: <code>-</code><br>Example: <code>Failed to send message</code></p> |
| {% endtab %}                     |                                                                                                                                                                                                                                                                                                                             |

{% tab title="Parameter: Connection" %}

| Name                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| BusUri : `String`                              | <p>The URI for the AMQP Message bus, username and key must be url encoded.</p><p><br>Default: <code>"amqps\://:@:"</code><br>Example: <code>amqps\://:@:</code></p>                                                                                                                                                                                                                                                                                                                   |
| ClientCertificate : `SearchCertificateBy`      | <p>Select whether certificate is used and where it can be found.</p><p>Possible values:</p><ul><li><code>None</code>:</li></ul><p>Select whether certificate is used and where it can be found.</p><ul><li><code>Issuer</code>:</li></ul><p>Select whether certificate is used and where it can be found.</p><ul><li><code>File</code>:</li></ul><p>Select whether certificate is used and where it can be found.</p><p><br>Default: <code>0</code><br>Example: <code>None</code></p> |
| CertificateIssuer : `String`                   | <p>Issuer of certificate.</p><p><br>Default: <code>-</code><br>Example: <code>Issuer</code></p>                                                                                                                                                                                                                                                                                                                                                                                       |
| CertificateFilePath : `String`                 | <p>Path where .pfx (certificate) file can be found.</p><p><br>Default: <code>-</code><br>Example: <code>c:\Windows\foo.pfx</code></p>                                                                                                                                                                                                                                                                                                                                                 |
| 🗝CertificatePassword : `String`               | <p>Password for the certificate.</p><p><br>Default: <code>-</code><br>Example: <code>123</code></p>                                                                                                                                                                                                                                                                                                                                                                                   |
| DisableServerCertificateValidation : `Boolean` | <p>Disable server certificate validation when TLS is used. False means certificate is validated. If connection is not secured with tls this option does not do anything.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                     |
| {% endtab %}                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

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

| Name                | Description                                                                                                                                                                                                                                                                                        |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean` | <p>True if Message was sent successfully.<br>Example: <code>true</code></p>                                                                                                                                                                                                                        |
| Error : `Error`     | <p>Error information when the sending message fails and ThrowErrorOnFailure option is set to false. Contains detailed error message and additional debugging information.<br>Example: <code>{ "Message": "Sending failed", "AdditionalInfo": { "ExceptionType": "ArgumentException" } }</code></p> |
| {% endtab %}        |                                                                                                                                                                                                                                                                                                    |

{% tab title="Changelog" %}

## Changelog

### \[2.0.0] - 2025-09-24

#### Added

* New **Connection** tab with AMQP connection parameters.
* ThrowErrorOnFailure option in **Options** tab with default value `false`
* ErrorMessageOnFailure option in **Options** tab for custom error messages
* Error object in **Result** with `Message` and `AdditionalInfo` properties for detailed error reporting

#### Changed

* \[Breaking] Moved **Properties** from AmqpMessageProperties tab to Input tab, renamed to **MessageProperties**
* \[Breaking] Moved **ApplicationProperties** from AmqpMessageProperties tab to Input tab
* \[Breaking] Moved **BusUri** from Input tab to Connection tab
* \[Breaking] Moved **SearchClientCertificateBy** from Options tab to Connection tab, renamed to **ClientCertificate**
  * Enum value `DontUseCertificate` renamed to `None`
* \[Breaking] Moved **Issuer** from Options tab to Connection tab, renamed to **CertificateIssuer**
* \[Breaking] Moved **PfxFilePath** from Options tab to Connection tab, renamed to **CertificateFilePath**
* \[Breaking] Moved **PfxPassword** from Options tab to Connection tab, renamed to **CertificatePassword**
* \[Breaking] Moved **DisableServerCertValidation** from Options tab to Connection tab, renamed to **DisableServerCertificateValidation**
* Improved error handling with structured Error object in Result

### \[1.0.1] - 2022-08-26

#### Changed

* Dependencies update AMQPNetLite Version=2.2.0 to 2.4.4 Newtonsoft.Json Version=12.0.3 to 13.0.1 System.ComponentModel.Annotations 4.6.0 to 5.0.0

### \[1.0.0] - 2022-02-17

#### Added

* Initial implementation
  {% endtab %}
  {% endtabs %}
