> For the complete documentation index, see [llms.txt](https://docs.frends.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frends.com/tasks/tasks/other/frends.ibmmq.peekmessage.md).

# Frends.IBMMQ.PeekMessage

Task version: 2.0.0

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.IBMMQ>

## Task Parameters

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

| Name                             | Description                                                                                                                                                                                                                                                                                                                                                                    |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| MessageAsBytes : `Boolean`       | <p>If set to true, message contents are returned as a byte array.</p><p>Return field name is MessageBytes instead of Message.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                         |
| GetMessageProperties : `Boolean` | <p>Return Message properties in addition to the actual message.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                         |
| GetMessageDescriptor : `Boolean` | <p>Return Message descriptor information in addition to the actual message.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                           |
| ParseRFH2Header : `Boolean`      | <p>Return and strip RFH2 headers from the beginning of the message so that they won't be seen in the actual message.</p><p>RFH2 headers may be present in the message if the sender has written them.</p><p>This can be set to true with no ill effect even if the message doesn't have RFH2 headers.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p> |
| {% endtab %}                     |                                                                                                                                                                                                                                                                                                                                                                                |

{% tab title="Connection" %}

| Name                        | Description                                                                                      |
| --------------------------- | ------------------------------------------------------------------------------------------------ |
| HostName : `String`         | <p>Host name.</p><p><br>Default: <code>-</code><br>Example: <code>localhost</code></p>           |
| PortNumber : `Int32`        | <p>Port number.</p><p><br>Default: <code>-</code><br>Example: <code>1414</code></p>              |
| Channel : `String`          | <p>MQ Channel.</p><p><br>Default: <code>-</code><br>Example: <code>SYSTEM.DEF.SVRCONN</code></p> |
| QueueManagerName : `String` | <p>Queue manager.</p><p><br>Default: <code>-</code><br>Example: <code>QM1</code></p>             |
| Queue : `String`            | <p>Queue manager.</p><p><br>Default: <code>-</code><br>Example: <code>QM1</code></p>             |
| UserId : `String`           | <p>User ID.</p><p><br>Default: <code>-</code><br>Example: <code>user</code></p>                  |
| 🗝Password : `String`       | <p>Password.</p><p><br>Default: <code>-</code><br>Example: <code>PassWord</code></p>             |
| {% endtab %}                |                                                                                                  |

{% tab title="Options" %}

| Name                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SslCipherSpec : `String`           | <p>The TLS CipherSpec used for the connection.</p><p>Ensure this matches the CipherSpec configured on the MQ Channel.</p><p><br>Default: <code>-</code><br>Example: <code>TLS\_RSA\_WITH\_AES\_256\_CBC\_SHA256</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| SslPeerName : `String`             | <p>Used to verify the Distinguished Name (DN) of the Queue Manager's certificate.</p><p>Provides an additional layer of security by ensuring the client connects to the correct server.</p><p><br>Default: <code>-</code><br>Example: <code>CN=QMGR.\*, OU=IBM, OU=WEBSPHERE</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| SslResetCount : `Int32`            | <p>The number of bytes sent/received before the secret key is renegotiated.</p><p>Set to 0 to disable renegotiation.</p><p><br>Default: <code>-</code><br>Example: <code>0</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| SslCertRevocationCheck : `Boolean` | <p>Enables or disables SSL certificate revocation checking.</p><p>WARNING: This is a process-wide setting (MQEnvironment.SSLCertRevocationCheck)</p><p>that applies globally to all IBM MQ connections in the current process.</p><p>If multiple tasks run concurrently with different values, the last write wins</p><p>and may affect other tasks unpredictably.</p><p><br>Default: <code>-</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| CertSource : `CertificateSource`   | <p>Defines how the SSL certificate is sourced.</p><p>Possible values:</p><ul><li><code>Store</code>: Defines how the SSL certificate is sourced.</li><li><code>File</code>: Defines how the SSL certificate is sourced.</li></ul><p><br>Default: <code>1</code><br>Example: <code>CertificateSource.Store</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| StoreType : `SslStoreType`         | <p>Specifies the location of the certificate store.</p><p>On Windows, this distinguishes between Current User and Local Machine stores.</p><p>On Linux, .NET typically looks for certificates in the user's home directory (<del>/.dotnet/corefx/cryptography/x509stores/my/).</del></p><p>Possible values:</p><ul><li><code>User</code>: Specifies the location of the certificate store.</li></ul><p>On Windows, this distinguishes between Current User and Local Machine stores.</p><p>On Linux, .NET typically looks for certificates in the user's home directory (/.dotnet/corefx/cryptography/x509stores/my/).</p><ul><li><code>System</code>: Specifies the location of the certificate store.</li></ul><p>On Windows, this distinguishes between Current User and Local Machine stores.</p><p>On Linux, .NET typically looks for certificates in the user's home directory (\~/.dotnet/corefx/cryptography/x509stores/my/).</p><p><br>Default: <code>0</code><br>Example: <code>SslStoreType.User</code></p> |
| CertificatePath : `String`         | <p>The absolute path to the .p12 or .pfx certificate file.</p><p><br>Default: <code>-</code><br>Example: <code>Windows: "C:\certs\client.p12" Linux: "/app/certs/client.p12"</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| CertificatePassword : `String`     | <p>The password for the certificate file.</p><p><br>Default: <code>-</code><br>Example: <code>PassWord</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ThrowErrorOnFailure : `Boolean`    | <p>Whether to throw an error on failure.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ErrorMessageOnFailure : `String`   | <p>Overrides the error message on failure.</p><p><br>Default: <code>-</code><br>Example: <code>Custom error message</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| {% endtab %}                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| {% endtabs %}                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

## Task Result

| Name                     | Description                                                                                                                                                      |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean`      | <p>Gets a value indicating whether the Task was executed successfully.<br>Example: <code>true</code></p>                                                         |
| MessageFound : `Boolean` | <p>Message found from the queue?<br>Example: <code>true</code></p>                                                                                               |
| Data : `QueueMessage`    | <p>Message data.<br>Example: <code>{ Message = "Hello", MessageBytes = null, MessageDescriptor = null, MessageProperties = null, RFH2Headers = null }</code></p> |
| Error : `Error`          | <p>Error that occurred during task execution.<br>Example: <code>object { string Message, Exception AdditionalInfo }</code></p>                                   |

## 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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.frends.com/tasks/tasks/other/frends.ibmmq.peekmessage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
