How pixelbyaj/mqdotnetclient works
Main Components
• Client Application Core – Represented by the MQDotnetClientApp directory. This contains key source files such as Program.cs and ConfigHelper.cs that initialize the application, set up configuration (from appsettings.json), create a service provider with logging, build up the QueueManager instance, as well as initiate message put/get operations.
• Configuration Module – Highlight the use of appsettings.json and the ConfigHelper class to extract all necessary settings for both IBM MQ connectivity and retry policies.
• IBM MQ Connectivity Component – This is encapsulated in the QueueManager and related model classes (QueueManagerModel and QueueRetryPolicy). It takes care of connecting to the queue manager, handling connection parameters, secure options, and retry/circuit-breaker logic.
• External Libraries and Dependencies – Include the IBMMQDotnetClient library for communication with IBM MQ, Microsoft.Extensions.Logging for logging, and Polly for managing resilience aspects.
• Dockerized IBM MQ Instance – Represented by the docker-compose.yml file. This component shows an externally hosted MQ Broker environment that provides actual MQ objects (Queue Manager QM1, DEV.QUEUE.1, channel DEV.APP.SVRCONN, listener SYSTEM.LISTENER.TCP.1) used by the client library.
Relationships and Interactions
• That the IBM MQ Connectivity Component relies on the IBMMQDotnetClient library for sending and receiving messages.
Architectural Patterns and Design Principles
• Separation of Concerns – Clearly show that configuration, connectivity, message processing, and logging are separate modules/components.
• Resilience and Fault Tolerance – Highlight the retry policy component (including parameters such as RetryCount, WaitAndRetrySeconds, etc.) and circuit breaker functionality.
• Dependency Injection – Present the use of a service provider for decoupling the logging and configuration connectors from the business logic.
Relevant Technologies and Frameworks
• .NET (C#) base for the application
• IBM MQ .NET Client library (IBMMQDotnetClient)
• Microsoft.Extensions.Logging
• Polly (for transient-fault-handling)
• Docker and docker-compose (for the MQ instance container)