# Read

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.Read>

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

| Name                          | Description                                                                                                                                                                                                                                                                                                                                            |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| SourceType : `QueueOrTopic`   | <p>Source type.</p><p>Possible values:</p><ul><li><code>Queue</code>:</li></ul><p>Source type.</p><ul><li><code>Topic</code>:</li></ul><p>Source type.</p><p><br>Default: <code>0</code><br>Example: <code>Queue</code></p>                                                                                                                            |
| QueueOrTopicName : `String`   | <p>The name of the queue or topic.</p><p><br>Default: <code>-</code><br>Example: <code>QueueOrTopicName</code></p>                                                                                                                                                                                                                                     |
| SubscriptionName : `String`   | <p>The 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> |
| {% endtab %}                  |                                                                                                                                                                                                                                                                                                                                                        |

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

| Name                                            | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| TimeoutSeconds : `Int32`                        | <p>Timeout in seconds.</p><p><br>Default: <code>60</code><br>Example: <code>60</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>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| BodySerializationType : `BodySerializationType` | <p>How the body is expected to be serialized.</p><p>Possible values:</p><ul><li><code>Stream</code>:</li></ul><p>How the body is expected to be serialized.</p><ul><li><code>ByteArray</code>:</li></ul><p>How the body is expected to be serialized.</p><ul><li><code>String</code>:</li></ul><p>How the body is expected to be serialized.</p><p><br>Default: <code>0</code><br>Example: <code>Stream</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                           |
| DefaultEncoding : `MessageEncoding`             | <p>What encoding the message contents is expected to be in.</p><p>Possible values:</p><ul><li><code>UTF8</code>:</li></ul><p>What encoding the message contents is expected to be in.</p><ul><li><code>UTF32</code>:</li></ul><p>What encoding the message contents is expected to be in.</p><ul><li><code>ASCII</code>:</li></ul><p>What encoding the message contents is expected to be in.</p><ul><li><code>Unicode</code>:</li></ul><p>What encoding the message contents is expected to be in.</p><ul><li><code>Latin1</code>:</li></ul><p>What encoding the message contents is expected to be in.</p><ul><li><code>BigEndianUnicode</code>:</li></ul><p>What encoding the message contents is expected to be in.</p><p><br>Default: <code>0</code><br>Example: <code>UTF8, UTF32, ASCII, Unicode, Latin1, BigEndianUnicode</code></p> |
| CreateQueueOrTopicIfItDoesNotExist : `Boolean`  | <p>Should the existence of the message source be checked and created if it does not exist.</p><p><br>Default: <code>False</code><br>Example: <code>False</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 and contains converter e.g. 61 minutes = 1 hour 1 minute.</p><p><br>Default: <code>5</code><br>Example: <code>5</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| TimeFormat : `TimeFormat`                       | <p>Time format for AutoDeleteOnIdle.</p><p>Possible values:</p><ul><li><code>Minutes</code>:</li></ul><p>Time format for AutoDeleteOnIdle.</p><ul><li><code>Hours</code>:</li></ul><p>Time format for AutoDeleteOnIdle.</p><ul><li><code>Days</code>:</li></ul><p>Time format 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>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| {% endtab %}                                    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

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

| Name                         | Description  |
| ---------------------------- | ------------ |
| Results : `List<ReadResult>` | Read 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 %}
