c# - Using Websphere MQ QueueDepth with a clustered queue -


i have c# application needs periodically check depth of queue, potentially determines behaviors new inbound messages. (essentially, when have high depth in queue extended period , other qualifications met, messages need set higher priority level ensure they're processed promptly.)

my code worked fine on development side, when went qa, started failing compcode: 1, reason: 2068. research seems indicate means queue in question clustered in qa environment, , request invalid clustered queue.

i'm not experienced websphere interface, i'm hoping can me figure out how this.

here's way i'm calling now:

try {     mqqueuemanager mqmanager = new mqqueuemanager(queuemanager);     mqqueue mqqueue = mqmanager.accessqueue(queuename, mqc.mqoo_output + mqc.mqoo_inquire + mqc.mqoo_fail_if_quiescing);     int depth = mqqueue.currentdepth;     mqqueue.close();     mqmanager.disconnect();     return depth; } catch (exception ex) {     //there's lots of irrelevant handling here } 

you need local instance of cluster queue present in queue manager application connecting inquire queue depth. if no local instance present, few attributes can inquired documented here - under #4 of usage notes.

from v701 onwards mq ships cluster queue monitoring utility amqsclm can monitor cluster queues , route messages other cluster queues if messages not being consumed. may have @ utility. sample code available utility, customize it.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -