---
title: Resolve logging queue path
summary: Resolve the configured queue server/name values into a direct-format MSMQ path string.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-07-30
library: SAIF.Framework.Logging
reference_type: package
operation_id: LOG-OP-007
trigger: Caller invokes clsLoggingQueues.GetQueueName()
---

# Resolve logging queue path

This is a small configuration helper for callers that need a direct-format MSMQ queue path but do not open or use a queue themselves. It lazily loads the server and queue-name settings, substitutes hard-coded defaults whenever configuration is missing or empty, and returns the formatted path string without performing any queue I/O.

| Field | Value |
| --- | --- |
| **Operation ID** | LOG-OP-007 |
| **Trigger** | Caller invokes `clsLoggingQueues.GetQueueName()`. |
| **Inputs** | None directly; reads `QueueServer` and `QueueName` from `AppSettings` on demand. |
| **Outputs** | `FormatName:DIRECT=OS:{server}\{queue}` string. |
| **Primary components** | `clsLoggingQueues.QueueServer`, `clsLoggingQueues.QueueName`, `clsLoggingQueues.GetQueueName` |
| **Entry point** | `SAIF.Framework.Logging/clsLoggingQueues.vb` |

## Steps

1. Resolve `QueueServer` through its lazy property.
   - If the cached `m_QServer` field is empty, read `ConfigurationManager.AppSettings.Item("QueueServer")`.
   - If the retrieved value is empty, substitute the hard-coded default `MQPROD` ([BR-007](../business-rules.md#br-007-queue-nameserver-resolution-falls-back-to-hard-coded-defaults)).
2. Resolve `QueueName` through the same pattern.
   - If the cached `m_QName` field is empty, read `ConfigurationManager.AppSettings.Item("QueueName")`.
   - If the retrieved value is empty, substitute the hard-coded default `logging` ([BR-007](../business-rules.md#br-007-queue-nameserver-resolution-falls-back-to-hard-coded-defaults)).
3. Return `String.Format("FormatName:DIRECT=OS:{0}\{1}", QueueServer, QueueName)` using the resolved values ([BR-007](../business-rules.md#br-007-queue-nameserver-resolution-falls-back-to-hard-coded-defaults)).

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([GetQueueName request]) --> Server[Resolve QueueServer or default]
	Server --> Queue[Resolve QueueName or default]
	Queue --> Format[Format direct queue path]
	Format --> End([Return queue string])
```

## Failure and edge-case behavior

- Server and queue-name values are cached after the first resolution, so subsequent changes to `AppSettings` are not picked up until the process restarts.
- Missing or empty configuration falls back to `MQPROD` and `logging` rather than failing the caller, guaranteeing a usable path string in every case ([BR-007](../business-rules.md#br-007-queue-nameserver-resolution-falls-back-to-hard-coded-defaults)).
- The operation returns only a formatted string; it never verifies that the target queue actually exists or is reachable.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Configuration](../configuration.md)

## Sources
- `SAIF.Framework.Logging/clsLoggingQueues.vb`
