|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Design question on Dispacter |
« View previous topic :: View next topic » |
Author |
Message
|
araghav |
Posted: Tue Jul 09, 2002 12:44 pm Post subject: Design question on Dispacter |
|
|
Novice
Joined: 21 May 2002 Posts: 12
|
I am trying to come with dispatcher design and for some reason it does not look effecient. Please let me know if you have any feedback on this.
We have 2 queues. Each queue will have a asynchronous listner thread. When message is received, it browses (JMS API) through messages and writes all messageid to a common queue. On other side of queue, we have a pool of threads (workers). Free thread will pick up messageid and will establish new connection and retrieve message based on messageid and process it. Worker thread is also responsible for managing single phase transaction.
(note: this design is based on following article [url]http://www-3.ibm.com/software/webservers/appserv/doc/was_jmsjta.pdf [/url])
I have few doubts
- I am reading message twice (message is really big). Once for browse and other time for retrieve.
- What is the best way to handle session and connection? Message frequency is low.
TIA |
|
Back to top |
|
 |
nimconsult |
Posted: Tue Jul 09, 2002 11:08 pm Post subject: |
|
|
 Master
Joined: 22 May 2002 Posts: 268 Location: NIMCONSULT - Belgium
|
- Why do you need the intermediate "master" thread to dispatch the messageids to the "worker" threads. Why don't the worker thread immediately consume the message queues?
- If you still want your master thread anyway, consider avoiding to re-open the connection or sessions each time you consume a message. Keep the connection and sessions opened. This will significantly reduce the overhead of the application.
- Regarding your questions on reading a big message twice, your master thread can issue an MQGET with a bufferlength of zero and MQGMO_ACCEPT_TRUNCATED_MSG. It will not read the big message content, but will allow the thread to receive the message descriptor. _________________ Nicolas Maréchal
Senior Architect - Partner
NIMCONSULT Software Architecture Services (Belgium)
http://www.nimconsult.be |
|
Back to top |
|
 |
araghav |
Posted: Wed Jul 10, 2002 11:05 am Post subject: |
|
|
Novice
Joined: 21 May 2002 Posts: 12
|
- We want to keep our logic in EJB. As it is not possible to open session , receive message and pass that message to EJB (it will keep master thread occupied as transaction will only be committed once process is completely successfully). Also, WAS4 does not support MDB but we want to keep our design so that it is extensible in future. These are primary reasons
- We are using JMS so we can not use bufferlength and MQGMO_ACCEPT_TRUNCATED_MSG options here. Unless, there is a way to set this property through JMS |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|