For the complete documentation index, see llms.txt. This page is also available as Markdown.

Read

Read messages from RabbitMQ queue. Message data is byte[] encoded to base64 and UTF8 strings.

Task version: 2.3.0

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Task Parameters

Name
Description

ReadMessageCount : Int32

Maximum number of messages to read.

Default: 1 Example: 1

AckType : AckType

Set the acknowledgement type.

Possible values:

  • NoAck: Set the acknowledgement type.

  • AutoAck: Set the acknowledgement type.

  • AutoNack: Set the acknowledgement type.

  • AutoNackAndRequeue: Set the acknowledgement type.

  • AutoReject: Set the acknowledgement type.

  • AutoRejectAndRequeue: Set the acknowledgement type.

Default: 1 Example: AutoAck

AuthenticationMethod : AuthenticationMethod

Authentication method: URI, hostname with username/password, or certificate.

Possible values:

  • URI: Authentication method: URI, hostname with username/password, or certificate.

  • Host: Authentication method: URI, hostname with username/password, or certificate.

  • Certificate: Authentication method: URI, hostname with username/password, or certificate.

  • CertificateWithCredentials: Authentication method: URI, hostname with username/password, or certificate.

Default: - Example: URI

🗝Host : String

URI or hostname to connect to, depending on authentication method.

Default: - Example: RabbitHost, amqp://foo:bar@localhost:1234

Username : String

Username to use when authenticating to the server.

Default: - Example: foo

🗝Password : String

Password to use when authenticating to the server.

Default: - Example: bar

Port : Int32

The port to connect on. Value 0 indicates that the default port for the protocol should be used.

Default: - Example: 0

SslProtocol : SslProtocol

Specifies the SSL protocol used for the RabbitMQ connection. Use SslProtocol.None to allow the operating system to negotiate the most secure protocol available.

Possible values:

  • None: Specifies the SSL protocol used for the RabbitMQ connection. Use SslProtocol.None to allow the operating system to negotiate the most secure protocol available.

  • Tls12: Specifies the SSL protocol used for the RabbitMQ connection. Use SslProtocol.None to allow the operating system to negotiate the most secure protocol available.

  • Tls13: Specifies the SSL protocol used for the RabbitMQ connection. Use SslProtocol.None to allow the operating system to negotiate the most secure protocol available.

Default: - Example: SslProtocol.None

CertificateSource : CertificateSource

Specifies the source from which the client certificate should be loaded.

Possible values:

  • File: Specifies the source from which the client certificate should be loaded.

  • Store: Specifies the source from which the client certificate should be loaded.

  • Base64: Specifies the source from which the client certificate should be loaded.

  • RawBytes: Specifies the source from which the client certificate should be loaded.

Default: - Example: CertificateSource.File

ClientCertificatePath : String

Full file system path to a client certificate file (.pfx or .p12) used for TLS client‑certificate authentication.

Default: - Example: C:\certs\client-auth.pfx

🗝ClientCertificatePassword : String

Password required to decrypt the certificate file. Needed for password‑protected .pfx/.p12 certificates.

Default: - Example: MyStrongPassword123!

🗝CertificateBase64 : String

Base64‑encoded representation of a client certificate (.pfx or .p12).

Default: - Example: MIIF2wIBAzCCB...

🗝CertificateBytes : Byte[]

Raw byte array containing a client certificate (.pfx or .p12).

Default: - Example: byte[] { 1, 2, 3, 4, 5 }

StoreThumbprint : String

Thumbprint of a certificate stored in the Windows certificate store.

Default: - Example: ab12cd34ef56ab78cd90ef12ab34cd56ef7890ab

CertificateStoreLocation : CertificateStoreLocation

Windows certificate store location to search when loading a certificate by thumbprint.

Possible values:

  • LocalMachine: Windows certificate store location to search when loading a certificate by thumbprint.

  • CurrentUser: Windows certificate store location to search when loading a certificate by thumbprint.

Default: - Example: CertificateStoreLocation.CurrentUser

QueueName : String

The name of the queue. Leave empty to make the server generate a name.

Default: - Example: SampleQueue

ExchangeName : String

Exchange's name.

Default: - Example: SampleExchange

RoutingKey : String

Routing key's name.

Default: - Example: route

VirtualHost : String

RabbitMQ virtual host to connect to.

Default: / Example: /

Timeout : Int32

Timeout setting for connection attempts. Value 0 indicates that the default value for the attempts should be used. Set value in seconds.

Default: - Example: 60

AllowInvalidCertificate : Boolean

Decide if the connection be allowed to use an invalid certificate.

NOTE: This is not recommended for production environments as it can expose the connection to man-in-the-middle attacks.

Use with caution and only in testing or development scenarios where security is not a concern.

Default: False Example: false

Name
Description

ThrowErrorOnFailure : Boolean

Whether to throw an error on failure.

Default: True Example: true

ErrorMessageOnFailure : String

Overrides the error message on failure.

Default: - Example: Custom error message

Task Result

Name
Description

Success : Boolean

Read status. There was no messages to read if MessageUTF8 and MessagesBase64 are empty but Success=true.

MessagesBase64 : List<Message>

Message in Base64 format. Example: VGVzdCBtZXNzYWdl, {foo, bar}, 1, 1

MessageUTF8 : List<Message>

Message in UTF8 format. Example: Test message, {foo, bar}, 1, 1

Error : Error

Error that occurred during task execution. Example: object { string Message, Exception AdditionalInfo }

Task Changelog

Changelog for Task Frends.RabbitMQ.Read.

[2.3.0] - 2026-04-26

Added

  • Added new property Connection.AllowInvalidCertificate to allow invalid certificates.

[2.2.0] - 2026-04-14

Added

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

[2.1.0] - 2026-03-17

Added

  • Added CertificateWithCredentials authentication method that requires both a valid client certificate and username/password credentials to connect.

  • Added Certificate authentication method for TLS client-certificate authentication with new enums (CertificateSource, SslProtocol, CertificateStoreLocation) and connection properties (ClientCertificatePath, ClientCertificatePassword, CertificateBase64, CertificateBytes, StoreThumbprint, CertificateStoreLocation, SslProtocol, CertificateSource).

  • Added VirtualHost field to Connection parameters to allow specifying a RabbitMQ virtual host. Defaults to "/".

[2.0.0] - 2026-02-23

Changed

  • Acknowledgement of messages logic was simplified.

  • Types of acknowledge actions were clarified.

  • [Breaking Change] Rename ManualAck to NoAck as it's more descriptive (ack is not set with this option and can't be sent manually within this task)

  • [Breaking Change] Rename Connection.AutoAck property to Connection.AckType

[1.1.0] - 2025-02-14

Fixed

  • Update RabbitMQ.Client from 6.4.0 to 7.1.2

[1.0.2] - 2023-03-14

Fixed

  • Fixed issue with connections and channels were left open by implementing IDisposable class in ConnectionHelper class.

Added

  • Added support for reading messages from quorum queues.

[1.0.1] - 2022-10-12

Added

  • New property: Result.Success to indicate that the Read task was successfully completed.

[1.0.0] - 2022-08-22

Added

  • Initial implementation

Last updated

Was this helpful?