A Better MD Class than IBM’s MQMD Class

This is a follow up to my blog posting last week titled: Java MQMD class Weirdness. After beating my head against the wall, I gave up on the ‘com.ibm.mq.headers.MQMD’ class and went back to my own MD (Message Descriptor) class. At least I know it works. 🙂

The reason I originally created my MD class was to keep the JVM memory use to a minimum in MQ Visual Edit (MQVE). MQVE passes my MD object between threads rather than the whole MQMessage object. The MQMessage class is very heavy to begin with and then add 100KB or 1MB of message data and the JVM memory usage starts to really go up when dealing with many messages. Everything MQVE does is thread based (to stay off the event thread), hence, it keeps MQVE very responsive to the user. There are many cases when MQVE only needs the MD and not the whole message.

My MD class is called MDOnly. It has the standard constructors and all the necessary getter and setter methods plus I added the copyTo and copyFrom methods. You can download the MDOnly and the JavaDocs for it from this link.

Enjoy.

Regards,
Roger Lacroix
Capitalware Inc.

This entry was posted in Capitalware, IBM i (OS/400), IBM MQ, Java, Linux, macOS (Mac OS X), Programming, Unix, Windows.

Comments are closed.