ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » MQ REST API - Validate MQ Server Availability

Post new topic  Reply to topic
 MQ REST API - Validate MQ Server Availability « View previous topic :: View next topic » 
Author Message
RHeunes
PostPosted: Wed Feb 26, 2025 11:17 pm    Post subject: MQ REST API - Validate MQ Server Availability Reply with quote

Novice

Joined: 13 Sep 2021
Posts: 16

Hi,

I want to use the MQ REST API to validate that the MQ server is up before submitting transactions.

I tried the following to see Queue Manager status:

https://qaesb01:9443/ibmmq/rest/v2/admin/qmgr/QM01/

and get the following output:

{
"qmgr": [
{
"name": "QM01",
"state": "running"
}
]
}

This is fine, but I want to target the SVRCONN (APP.SVRCONN), I have had a look but I am not able to find a way to do it, does anyone know where I can find a reference for this or if it is possible.

Regards,

Rayn
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Feb 27, 2025 10:21 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Why exactly do you need to target the svrconn channel? SVRCONN channels are only active when an app is connected.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
RHeunes
PostPosted: Thu Feb 27, 2025 11:57 pm    Post subject: Reply with quote

Novice

Joined: 13 Sep 2021
Posts: 16

Oh yeah that is not really gonna help, I guess qmgr will have to do then. However for interest sake you know of any reference guide for the REST API?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Feb 28, 2025 10:21 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

https://developer.ibm.com/tutorials/mq-develop-mq-rest-api/
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Sun Mar 02, 2025 5:09 pm    Post subject: Re: MQ REST API - Validate MQ Server Availability Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

RHeunes wrote:
Hi,

I want to use the MQ REST API to validate that the MQ server is up before submitting transactions.


Don't do this. Its a waste of time.

What are you gonna do if you check if the queue manager is up with REST, its says its up, and one millisecond after that it does down? What good is your up status? Its worthless. You are going to isse your transaction anyway and have to deal with the failed MQ call anyway.


What are you gonna do if you check if the queue manager is up with REST, its says its down, and one millisecond after that it actually comes back up? What good is your down status? Now you are wasting time not issuing the transaction that would have worked.


Just submit the transaction and check the MQ Reason Code that the queue manager returns on every single MQ API call you issue.

When you need to talk with your buddy on the phone, do you call your buddy to ask if he is ready to talk, hang up and then call right back to talk for reals? No, of course not.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
bruce2359
PostPosted: Sun Mar 02, 2025 7:28 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

wholeheartedly with Mr. Potkay.
Same applies when pondering (inquiring) current queue depth to see if there are messages to consume. Merely do a get, then check ReasonCode.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » MQ REST API - Validate MQ Server Availability
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.