Publish
Publish message to RabbitMQ queue in UTF8 or byte array format.
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
InputType : InputType
Data input type.
Possible values:
String: Data input type.ByteArray: Data input type.
Default: -
Example: String, Byte Array
DataByteArray : Byte[]
Data payload in byte array format.
Default: -
Example: 54 65 73 74 20 6d 65 73 73 61 67 65
DataString : String
Data payload in string format.
Default: -
Example: Test message
Headers : Header[]
List of headers to be added to the request.
Default: -
Example: foo, bar
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: 60
Example: 60
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 of 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
Create : Boolean
True to declare queue when publishing.
Default: False
Example: false
AutoDelete : Boolean
Should this queue be auto-deleted when its last consumer (if any) unsubscribes?
Default: False
Example: false
Durable : Boolean
Should this queue will survive a broker restart?
Note that Quorum queue supports only Durable settings.
Default: True
Example: true
Quorum : Boolean
Should this queue be a quorum queue.
Default: True
Example: true
VirtualHost : String
RabbitMQ virtual host to connect to.
Default: /
Example: /
ConnectionExpirationSeconds : Int32
Time in seconds how long a connection will be left open for reuse after the execution.
Default: 30
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
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
Success : Boolean
Indicates if the task completed successfully.
Example: true
DataFormat : String
Published data format.
Example: String
DataString : String
Published data (message) in UTF8 string format.
Example: Foo Bar
DataByteArray : Byte[]
Published data (message) in byte array format.
Example: 46 6f 6f 20 42 61 72
Headers : Dictionary<String, String>
Headers of the published message.
Example: foo, bar
Error : Error
Error that occurred during task execution.
Example: object { string Message, Exception AdditionalInfo }
Task Changelog
Changelog for Task Frends.RabbitMQ.Publish.
[1.11.0] - 2026-04-26
Added
Added new property
Connection.AllowInvalidCertificateto 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
Textattribute to theVirtualHostproperty 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 arrayby 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
Last updated
Was this helpful?

