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¶
- Resolve
QueueServerthrough its lazy property. - If the cached
m_QServerfield is empty, readConfigurationManager.AppSettings.Item("QueueServer"). - If the retrieved value is empty, substitute the hard-coded default
MQPROD(BR-007). - Resolve
QueueNamethrough the same pattern. - If the cached
m_QNamefield is empty, readConfigurationManager.AppSettings.Item("QueueName"). - If the retrieved value is empty, substitute the hard-coded default
logging(BR-007). - Return
String.Format("FormatName:DIRECT=OS:{0}\{1}", QueueServer, QueueName)using the resolved values (BR-007).
Process flow¶
The following diagram visualizes this operation's control flow.
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
AppSettingsare not picked up until the process restarts. - Missing or empty configuration falls back to
MQPRODandloggingrather than failing the caller, guaranteeing a usable path string in every case (BR-007). - The operation returns only a formatted string; it never verifies that the target queue actually exists or is reachable.
Related documentation¶
Sources¶
SAIF.Framework.Logging/clsLoggingQueues.vb