• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

MQ Prorgamming with Java - Improving Performance

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1970
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"kutts kutt",
Please check your private messages.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
This guy is skipping without a rope. At least, that's what this tiny ad said:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic