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

PeekMessage

Frends Task to peek messages from IBM MQ queues.

Task version: 2.0.0

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Crossplatform

Task Parameters

Name
Description

MessageAsBytes : Boolean

If set to true, message contents are returned as a byte array.

Return field name is MessageBytes instead of Message.

Default: False Example: false

GetMessageProperties : Boolean

Return Message properties in addition to the actual message.

Default: True Example: true

GetMessageDescriptor : Boolean

Return Message descriptor information in addition to the actual message.

Default: False Example: false

ParseRFH2Header : Boolean

Return and strip RFH2 headers from the beginning of the message so that they won't be seen in the actual message.

RFH2 headers may be present in the message if the sender has written them.

This can be set to true with no ill effect even if the message doesn't have RFH2 headers.

Default: False Example: false

Name
Description

HostName : String

Host name.

Default: - Example: localhost

PortNumber : Int32

Port number.

Default: - Example: 1414

Channel : String

MQ Channel.

Default: - Example: SYSTEM.DEF.SVRCONN

QueueManagerName : String

Queue manager.

Default: - Example: QM1

Queue : String

Queue manager.

Default: - Example: QM1

UserId : String

User ID.

Default: - Example: user

🗝Password : String

Password.

Default: - Example: PassWord

Name
Description

SslCipherSpec : String

The TLS CipherSpec used for the connection.

Ensure this matches the CipherSpec configured on the MQ Channel.

Default: - Example: TLS_RSA_WITH_AES_256_CBC_SHA256

SslPeerName : String

Used to verify the Distinguished Name (DN) of the Queue Manager's certificate.

Provides an additional layer of security by ensuring the client connects to the correct server.

Default: - Example: CN=QMGR.*, OU=IBM, OU=WEBSPHERE

SslResetCount : Int32

The number of bytes sent/received before the secret key is renegotiated.

Set to 0 to disable renegotiation.

Default: - Example: 0

SslCertRevocationCheck : Boolean

Enables or disables SSL certificate revocation checking.

WARNING: This is a process-wide setting (MQEnvironment.SSLCertRevocationCheck)

that applies globally to all IBM MQ connections in the current process.

If multiple tasks run concurrently with different values, the last write wins

and may affect other tasks unpredictably.

Default: - Example: false

CertSource : CertificateSource

Defines how the SSL certificate is sourced.

Possible values:

  • Store: Uses the Operating System's certificate store.

Corresponds to IBM MQ '*USER' or '*SYSTEM' storage.

  • File: Loads the certificate directly from a specific file system path.

Default: File Example: CertificateSource.Store

StoreType : SslStoreType

Specifies the location of the certificate store.

On Windows, this distinguishes between Current User and Local Machine stores.

On Linux, .NET typically looks for certificates in the user's home directory (~/.dotnet/corefx/cryptography/x509stores/my/).

Possible values:

  • User: Use the certificate store of the current user.

  • System: Use the system-wide certificate store.

Default: User Example: SslStoreType.User

CertificatePath : String

The absolute path to the .p12 or .pfx certificate file.

Default: - Example: Windows: "C:\certs\client.p12" Linux: "/app/certs/client.p12"

CertificatePassword : String

The password for the certificate file.

Default: - Example: PassWord

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

Gets a value indicating whether the Task was executed successfully. Example: true

MessageFound : Boolean

Message found from the queue? Example: true

Data : QueueMessage

Message data. Example: { Message = "Hello", MessageBytes = null, MessageDescriptor = null, MessageProperties = null, RFH2Headers = null }

Data.Message : String

Data.MessageBytes : Byte[]

Data.MessageProperties : MessageProperties

Data.MessageProperties.TotalMessageLength : Int32

Data.MessageProperties.PutDateTime : DateTime

Data.MessageProperties.PutApplicationType : Int32

Data.MessageProperties.PutApplicationName : String

Data.MessageProperties.MessageSequenceNumber : Int32

Data.MessageProperties.ApplicationOriginData : String

Data.MessageProperties.ApplicationIdData : String

Data.MessageProperties.UserId : String

Data.MessageProperties.PropertyValidation : Int32

Data.MessageProperties.OriginalLength : Int32

Data.MessageProperties.MessageType : Int32

Data.MessageProperties.MessageLength : Int32

Data.MessageProperties.MessageId : Byte[]

Data.MessageProperties.MessageFlags : Int32

Data.MessageProperties.GroupId : Byte[]

Data.MessageProperties.DataOffset : Int32

Data.MessageProperties.DataLength : Int32

Data.MessageProperties.CorrelationId : Byte[]

Data.MessageProperties.CharacterSet : Int32

Data.MessageProperties.BackoutCount : Int32

Data.MessageProperties.AccountingToken : String

Data.MessageProperties.Version : Int32

Data.MessageProperties.Report : Int32

Data.MessageProperties.ReplyToQueueName : String

Data.MessageProperties.ReplyToQueueManagerName : String

Data.MessageProperties.Priority : Int32

Data.MessageProperties.Persistence : Int32

Data.MessageProperties.Offset : Int32

Data.MessageProperties.Format : String

Data.MessageProperties.Feedback : Int32

Data.MessageProperties.Expiry : Int32

Data.MessageProperties.Encoding : Int32

Data.MessageDescriptor : MessageDescriptor

Data.MessageDescriptor.Offset : Int32

Data.MessageDescriptor.MsgSequenceNumber : Int32

Data.MessageDescriptor.GroupID : Byte[]

Data.MessageDescriptor.ApplOriginData : Byte[]

Data.MessageDescriptor.PutTime : Byte[]

Data.MessageDescriptor.PutDate : Byte[]

Data.MessageDescriptor.PutApplName : Byte[]

Data.MessageDescriptor.PutApplType : Int32

Data.MessageDescriptor.ApplIdentityData : Byte[]

Data.MessageDescriptor.AccountingToken : Byte[]

Data.MessageDescriptor.UserID : Byte[]

Data.MessageDescriptor.ReplyToQueueMgr : Byte[]

Data.MessageDescriptor.ReplyToQueue : Byte[]

Data.MessageDescriptor.Persistence : Int32

Data.MessageDescriptor.Priority : Int32

Data.MessageDescriptor.Format : Byte[]

Data.MessageDescriptor.CodedCharacterSetId : Int32

Data.MessageDescriptor.StructMQMD : Object

Data.MessageDescriptor.Version : Int32

Data.MessageDescriptor.Encoding : Int32

Data.MessageDescriptor.MsgFlags : Int32

Data.MessageDescriptor.Ccsid : Int32

Data.MessageDescriptor.BackoutCount : Int32

Data.MessageDescriptor.CorrelId : Byte[]

Data.MessageDescriptor.Report : Int32

Data.MessageDescriptor.MsgType : Int32

Data.MessageDescriptor.Expiry : Int32

Data.MessageDescriptor.Feedback : Int32

Data.MessageDescriptor.MsgId : Byte[]

Data.MessageDescriptor.OriginalLength : Int32

Data.RFH2Headers : RFH2Headers

Data.RFH2Headers.Version : Int32

IBM MQ type: MQLONG

Data.RFH2Headers.CodedCharSetId : Int32

IBM MQ type: MQLONG

Data.RFH2Headers.Encoding : Int32

IBM MQ type: MQLONG

Data.RFH2Headers.Flags : Int32

IBM MQ type: MQLONG

Data.RFH2Headers.Format : String

Max length of 8 characters IBM MQ type: MQCHAR8

Data.RFH2Headers.NameValueCCSID : Int32

IBM MQ type: MQLONG

Data.RFH2Headers.NameValueData : String

IBM MQ type: MQCHARn Distinction to IBM MQ, here this field contains all possibly separate sections. NameValueLength indicates the length of this field

Data.RFH2Headers.NameValueLength : Int32

IBM MQ type: MQLONG Distinction to IBM MQ, here indicates the total length of all NameValueData-sections which are combined into one.

Data.RFH2Headers.StrucId : String

Max length of 4 characters IBM MQ type: MQCHAR4 Must have value of MQRFH_STRUC_ID (IBM MQ Constant)

Data.RFH2Headers.StrucLength : Int32

IBM MQ type: MQLONG Indicates the entire length of the RFH2 header

Error : Error

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

Error.Message : String

Summary of the error. Example: Unable to peek message.

Error.AdditionalInfo : Exception

Additional information about the error. Example: object { Exception AdditionalInfo }

Task Changelog

Changelog for Task Frends.IBMMQ.PeekMessage.

[2.0.0] - 2026-04-27

Added

Breaking Changes

  • Removed Ssl parameter tab. All SSL options have been moved to the Options parameter tab.

New Features

  • Added certificate source configuration via CertSource property (CertificateSource.Store or CertificateSource.File).

  • Added support for loading client certificates from Windows/Linux certificate store via StoreType property (SslStoreType.User or SslStoreType.System).

  • Added support for loading client certificates from a .p12/.pfx file via CertificatePath and CertificatePassword properties.

  • Added error handler with ThrowErrorOnFailure and ErrorMessageOnFailure options for consistent error handling.

[1.0.0] - 2024-01-24

Added

  • Initial implementation

Last updated

Was this helpful?