• Post Reply Bookmark Topic Watch Topic
  • New Topic

MQ Prorgamming with Java - Improving Performance

 
Gabbar singh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi - We are in the process of writing a Java component that would read from an MQ. This Q would get around 20K messages per hour. Our Java program needs to read this Q, parse the data and process it.

Are there any guidelines/ performance improving techniques while programming Java with MQ for Txns of this volume ? Any tips or pointers to sites containing MQ Java tuning techniques would be helpful. Thanks
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's an "MQ"?

For that matter, while I can guess, what's a "Q" and a "Txn"?

You'll have a better chance of getting useful replies if you UseRealWords.
 
Sreejith Sreekumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try IBM developerworks site. It woudl have the complete spec of the mq api. and also a couple of red books on performance. But dont expect too much. 20K mesages should be pretty fine..Keep doing memory profiling to fine tune.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"kutts kutt",
Please check your private messages.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assigning a separate Thread to each message read might be a good idea, that way any hold-ups in message processing would not cause a buildup of messages in the queue.

Bill
 
Raees Uzhunnan
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A queue send/receive model enables better parallelism; so you are in the right track. to scale the processing; simply increase the instances of the queue receiver. have 10-12 threads/ JVM and have 1-3 JVM.

In your case is you need to process 20,000 messages / hour i.e.
Per second processing 20,000/3600 = 6
suppose your processing per transaction takes 1 second; all you need is 6 threads and one JMV. But in reality based on complexity of your message you should be taking less than one sec.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!