# Send

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.CrossplatformServiceBus/tree/main/Frends.ServiceBus.Send>

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

| Name                             | Description                                                                                                                                                                                                                                                                                                                                            |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| DestinationType : `QueueOrTopic` | <p>Destination type.</p><p>Possible values:</p><ul><li><code>Queue</code>:</li></ul><p>Destination type.</p><ul><li><code>Topic</code>:</li></ul><p>Destination type.</p><p><br>Default: <code>0</code><br>Example: <code>Queue</code></p>                                                                                                             |
| QueueOrTopicName : `String`      | <p>Name of the queue or topic.</p><p><br>Default: <code>-</code><br>Example: <code>ExampleQueue</code></p>                                                                                                                                                                                                                                             |
| SubscriptionName : `String`      | <p>Name of the subscription.</p><p><br>Default: <code>-</code><br>Example: <code>SubscriptionName</code></p>                                                                                                                                                                                                                                           |
| 🗝ConnectionString : `String`    | <p>Service Bus connection string.</p><p><br>Default: <code>"Endpoint=sb://\[namespace].servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=\[secret]"</code><br>Example: <code>Endpoint=sb://\[namespace].servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=\[secret]</code></p> |
| Properties : `MessageProperty[]` | <p>Custom properties for the message.</p><p><br>Default: <code>-</code><br>Example: <code>Name = ExampleName, Value = ExampleValue</code></p>                                                                                                                                                                                                          |
| Data : `String`                  | <p>Data to send.</p><p><br>Default: <code>-</code><br>Example: <code>Example text.</code></p>                                                                                                                                                                                                                                                          |
| {% endtab %}                     |                                                                                                                                                                                                                                                                                                                                                        |

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

| Name                                            | Description                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| BodySerializationType : `BodySerializationType` | <p>How should the body of the message be serialized.</p><p>Possible values:</p><ul><li><code>Stream</code>:</li></ul><p>How should the body of the message be serialized.</p><ul><li><code>ByteArray</code>:</li></ul><p>How should the body of the message be serialized.</p><ul><li><code>String</code>:</li></ul><p>How should the body of the message be serialized.</p><p><br>Default: <code>0</code><br>Example: <code>Stream</code></p> |
| ContentType : `String`                          | <p>Content-Type descriptor.</p><p><br>Default: <code>"text/plain; charset=UTF-8"</code><br>Example: <code>text/plain; charset=UTF-8</code></p>                                                                                                                                                                                                                                                                                                 |
| MessageId : `String`                            | <p>The message identifier can be used to detect duplicate messages. A new guid is generated as the value if left empty or null.</p><p><br>Default: <code>-</code><br>Example: <code>254e5c7a-03eb-4637-935a-e1e61345c11d</code></p>                                                                                                                                                                                                            |
| SessionId : `String`                            | <p>Message's session identifier. Messages can be filtered according to the session identifier and handled on the same Service Bus broker ensuring delivery order.</p><p><br>Default: <code>-</code><br>Example: <code>f580ef61-bd66-4676-b98f-b9804961b339</code></p>                                                                                                                                                                          |
| CorrelationId : `String`                        | <p>The correlation identifier for the message can be used when filtering messages for subscriptions.</p><p><br>Default: <code>-</code><br>Example: <code>a1b58684-f04f-432a-bc73-1e72129ff6cc</code></p>                                                                                                                                                                                                                                       |
| ReplyTo : `String`                              | <p>The reply to field for the message can be used to specify the name of the queue where the receiver of the message should reply to.</p><p><br>Default: <code>-</code><br>Example: <code>ReplyToQueue</code></p>                                                                                                                                                                                                                              |
| ReplyToSessionId : `String`                     | <p>The reply to session identifier can be used to specify the session identifier for a reply message.</p><p><br>Default: <code>-</code><br>Example: <code>fff56b95-af19-4e1b-87f4-3464543dab02</code></p>                                                                                                                                                                                                                                      |
| To : `String`                                   | <p>The intended recipient of the message.</p><p><br>Default: <code>-</code><br>Example: <code>Recipient</code></p>                                                                                                                                                                                                                                                                                                                             |
| TimeToLiveSeconds : `Nullable<Int64>`           | <p>The time in seconds the message is kept in the queue before being discarded or deadlettered.</p><p><br>Default: <code>-</code><br>Example: <code>60</code></p>                                                                                                                                                                                                                                                                              |
| ScheduledEnqueueTimeUtc : `Nullable<DateTime>`  | <p>UTC time when the message should be added to the queue. Can be used to delay the delivery of a message. Using DateTime.Now if left empty.</p><p><br>Default: <code>-</code><br>Example: <code>DateTime.Now\.AddMinutes(5)</code></p>                                                                                                                                                                                                        |
| CreateQueueOrTopicIfItDoesNotExist : `Boolean`  | <p>Should the queue or topic be created if it does not already exist.</p><p><br>Default: <code>False</code><br>Example: <code>True</code></p>                                                                                                                                                                                                                                                                                                  |
| AutoDeleteOnIdle : `Int32`                      | <p>Idle interval after which the queue or topic+subscription is automatically deleted. See TimeFormat to select Minutes/Hours/Days/Never. The minimum duration is 5 minutes. Contains converter e.g. 61 minutes = 1 hour 1 minute or 4 minutes = 5 minutes.</p><p><br>Default: <code>5</code><br>Example: <code>5, 61</code></p>                                                                                                               |
| TimeFormat : `TimeFormat`                       | <p>Timeformat for AutoDeleteOnIdle.</p><p>Possible values:</p><ul><li><code>Minutes</code>:</li></ul><p>Timeformat for AutoDeleteOnIdle.</p><ul><li><code>Hours</code>:</li></ul><p>Timeformat for AutoDeleteOnIdle.</p><ul><li><code>Days</code>:</li></ul><p>Timeformat for AutoDeleteOnIdle.</p><p><br>Default: <code>0</code><br>Example: <code>Minutes/Hours/Days/Never</code></p>                                                        |
| MaxSize : `Int32`                               | <p>The maximum size of the queue/topic in megabytes. Default value is 1024.</p><p><br>Default: <code>1024</code><br>Example: <code>1024</code></p>                                                                                                                                                                                                                                                                                             |
| UseCachedConnection : `Boolean`                 | <p>Should the Service Bus connection (MessagingFactory) be cached. This speeds up the execution as creating a new connection is slow by keeping the connection open in the background. A single namespace is limited to 1000 concurrent connections.</p><p><br>Default: <code>True</code><br>Example: <code>True</code></p>                                                                                                                    |
| TimeoutSeconds : `Int64`                        | <p>Timeout in seconds.</p><p><br>Default: <code>60</code><br>Example: <code>60</code></p>                                                                                                                                                                                                                                                                                                                                                      |
| {% endtab %}                                    |                                                                                                                                                                                                                                                                                                                                                                                                                                                |

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

| Name                         | Description  |
| ---------------------------- | ------------ |
| Results : `List<SendResult>` | Send result. |
| {% endtab %}                 |              |

{% tab title="Changelog" %}

## Changelog

### \[1.1.0] - 2025-10-06

#### Changed

* Updated Repository link in the metadata.

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

#### Added

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