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 » IBM MQ Performance Monitoring » MQIACH_CHANNEL_TYPE

Post new topic  Reply to topic
 MQIACH_CHANNEL_TYPE « View previous topic :: View next topic » 
Author Message
Steve Coleman
PostPosted: Fri Sep 15, 2017 6:54 am    Post subject: MQIACH_CHANNEL_TYPE Reply with quote

Newbie

Joined: 15 Sep 2017
Posts: 3

I'm attempting to get the channel type from my MQ virtual appliance. I have a java app and everything seems to be working fine except this.

String[] chTypeText = {"SENDER", "SERVER", "RECEIVER", "REQUESTER", "SVRCONN", "CLNTCONN", "CLUSRCVR", "CLUSSDIR"};

The channel type I'm inquiring about is definitely a SVRCONN channel because that's how it's listed in "display channel(*)". However the chTypeText keeps indexing to "CLUSSDIR" or int = 7 as the results.

Are my constants in chTypeText in the correct order? Am I missing any?

Thanks..any guidance is much appreciated.
Back to top
View user's profile Send private message Send e-mail
exerk
PostPosted: Fri Sep 15, 2017 7:38 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Should not "CLUSSDIR" read "CLUSSDR" ?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
Steve Coleman
PostPosted: Fri Sep 15, 2017 8:37 am    Post subject: Reply with quote

Newbie

Joined: 15 Sep 2017
Posts: 3

Apologies...yes it should have been

String[] chTypeText = {"SENDER", "SERVER", "RECEIVER", "REQUESTER", "SVRCONN", "CLNTCONN", "CLUSRCVR", "CLUSSDR"};

That has been corrected. But the index being returned is "7" which would indicate that the channel type is a "CLUSSDR" but it's a SVRCONN channel.

So I'm asking if the constants are correct and in the appropriate position and / or am I missing any because the returned value is not correct with respect to the actual channel type.

Thanks xerk
Back to top
View user's profile Send private message Send e-mail
RogerLacroix
PostPosted: Fri Sep 15, 2017 10:07 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3252
Location: London, ON Canada

Hi,

I think you are confused about the channel type value returned:
Code:
- MQCHT_SENDER    =  1
- MQCHT_SERVER    =  2
- MQCHT_RECEIVER  =  3
- MQCHT_REQUESTER =  4
- MQCHT_ALL"      =  5
- MQCHT_CLNTCONN  =  6
- MQCHT_SVRCONN   =  7
- MQCHT_CLUSRCVR  =  8
- MQCHT_CLUSSDR   =  9
- MQCHT_MQTT      = 10
- MQCHT_AMQP      = 11

So, technically speaking, assuming zero-based, your string array should be:

Code:
String[] chTypeText = {"", "SENDER", "SERVER", "RECEIVER", "REQUESTER", "ALL", "CLNTCONN", "SVRCONN", "CLUSRCVR", "CLUSSDR", "MQTT", "AMQP"};


Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
markt
PostPosted: Fri Sep 15, 2017 10:36 am    Post subject: Reply with quote

Knight

Joined: 14 May 2002
Posts: 502

To avoid the hardcoded text in your program, I'd use something like MQConstants.lookup(value, "MQCHT_.*").
Back to top
View user's profile Send private message
Steve Coleman
PostPosted: Fri Sep 15, 2017 10:54 am    Post subject: Reply with quote

Newbie

Joined: 15 Sep 2017
Posts: 3

Thanks Roger. Appreciate the advice. I'm new to PCF and the example I found for those values was what I posted. Your update is spot on. A bit difficult to find to PCF examples. I like the examples on Capitalware.
Back to top
View user's profile Send private message Send e-mail
gbaddeley
PostPosted: Sun Sep 17, 2017 5:08 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
Location: Melbourne, Australia

In MQ v8 there is a new C/C++ header file cmqstrc.h that has functions for mapping integer values to constant strings. The MQCHT_STR function returns "MQCHT_SVRCONN" for value 7.
_________________
Glenn
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 » IBM MQ Performance Monitoring » MQIACH_CHANNEL_TYPE
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.