Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow IBM MQ Health Check to do a deeper check including the Queue/Topic/Process #683

Open
bakgerman opened this issue Nov 22, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request ibmmq Ups for grabs Issue is available to anyone who is interested

Comments

@bakgerman
Copy link

What would you like to be added:
Today the health check constructs a new MQMQueueManager and checks for lack of an Exception. Which works great. I would like it to optionally also call queueManager.AccessQueue() or queueManager.AccessTopic() or queueManager.AccessProcess() to see if said entity actually exists. All 3 of these take a string as the 1st argument and possibly the 2nd argument of int openOptions could be left at zero (still looking into this, got it to work for AccessQueue so far).

Why is this needed:
Currently checks if the queue manager can connect (which is cool), but cannot tell me if the queue or topic or process exists.
In my use case I also need to check in queue or topic exists.

Altered the existing IBMMQHealthCheck source code with an EntityType and an EntityName to tell it which type of item to check(queue/topic/process) and the string identiofying the entity. If those are null the addl check is not executed.

@bakgerman
Copy link
Author

Maybe build IBMMQQueueHealthCheck and IBMMQProcessHealthCheck, where there is additional string argument for queueName or processName.

@bakgerman
Copy link
Author

I am working on a PR for this, will submit in a few days

@CarlosLanderas
Copy link
Contributor

Great @bakgerman, thanks!

@bakgerman
Copy link
Author

So far I have added in my branch

HealthChecks.IbmMQ
IbmMQProcessHealthCheck
IbmMQQueueHealthCheck
IbmMQTopicHealthCheck

HealthChecks.IbmMQ.DependencyInjection
IbmMQProcessHealthCheckBuilderExtensions
IbmMQQueueHealthCheckBuilderExtensions
IbmMQTopicHealthCheckBuilderExtensions

UnitTests.DependencyInjection
Added missing folder for IbmMQ
Added missing unit test for the original IbmMQHealthCheck.cs, the unit test file IbmMQUnitTests.cs
Added 3 new unit test classes
IbmMQProcessUnitTests
IbmMQQueueUnitTests
IbmMQTopicUnitTests

I am currently working on updating the Readme.MD file in the HealthChecks.IbmMQ project.

I examined the IbmMQ integration tests for possible updates, but (unless I misunderstood) these seem to be specific to a IBM MQ server running in a very specific setup.

I also examined the Samples folder but did not find anything there relayed to IbmMQ.

Is there anything else I should be doing? Any required update I have missed so far?

Thanks,
Burak

@fglaeser
Copy link
Contributor

Hi @bakgerman , the test unit run againts a mq server using the docker-compose file. Start the ibmmq service and then run the unit test.

@sungam3r sungam3r added ibmmq enhancement New feature or request labels Jul 22, 2023
@sungam3r
Copy link
Collaborator

PR is welcome.

@sungam3r sungam3r added the Ups for grabs Issue is available to anyone who is interested label Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ibmmq Ups for grabs Issue is available to anyone who is interested
Projects
None yet
Development

No branches or pull requests

4 participants