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 IndexIBM MQ Java / JMSMQJMS API, how to get the queue depth without using browser

Post new topicReply to topic Goto page Previous  1, 2
MQJMS API, how to get the queue depth without using browser View previous topic :: View next topic
Author Message
abhay09
PostPosted: Thu Jun 02, 2016 9:00 am Post subject: Reply with quote

Acolyte

Joined: 31 May 2016
Posts: 54

fjb_saper wrote:
Depending on your system there is a problem with the Encoding. I hit that one on Windows (little Endian) as the bytestream you retrieved from the reply does not take into account the Encoding. A CCSID should also be specified?

For this I had to use the pcfHeader which allows you to pass into the constructor a CCSID and Encoding... and then create the pcf message from the header chain...



If possible, Can you share your working PCF code using MQJMS.
I followed this and read docs
https://www.ibm.com/developerworks/community/blogs/messaging/entry/using_pcf_with_mq_jms?lang=en

Then also, not able to get depth.

If possible, Please share the working code. that will be great help!

Thanks!
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Sun Jun 05, 2016 4:32 pm Post subject: Reply with quote

Padawan

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

Quote:
So, shall i use this approach to get depth in MQJMS and poll Mq queue based on the depth (number of threads will be based on depth)?
Experts , Pls guide shall i use this agent to get depth ?

As already stated, it is generally not a good design to spin up threads based on queue depth. Has the proposal been reviewed by an MQ specialist? What thresholding logic will be used? Eg.

If the current depth is greater than X, for Y successive samples at a Z minute intervals, and there are less than N consumers currently running, then start an additional consumer.

If the current depth is less than than X, for Y successive samples at a Z minute intervals, and there are more than M consumers currently running, then stop a consumer.


This does not take into account any other resource constraints that may result in a steadily increasing queue depth, and will not be solved by running a large number of consumers. Eg. Shortage of CPU, Memory, Disk bandwidth, Network bandwidth, Contention on Databases.

It is MUCH easier to spin up a fixed number of consumers, that based on performance tests, can cope with any normal expected peak load. Implement monitoring and alerting on the queue depth. If the consumers can't keep up with the load, investigate the root cause. This may require adding more resources, or permanently running additional consumers.

Trying to implement intelligent consumer resourcing may create a rod for your own back, or your successors!
_________________
Glenn
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum IndexIBM MQ Java / JMSMQJMS API, how to get the queue depth without using browser
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.