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 Index » IBM MQ Java / JMS » Design question on Dispacter

Post new topic  Reply to topic
 Design question on Dispacter « View previous topic :: View next topic » 
Author Message
araghav
PostPosted: Tue Jul 09, 2002 12:44 pm    Post subject: Design question on Dispacter Reply with quote

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
View user's profile Send private message
nimconsult
PostPosted: Tue Jul 09, 2002 11:08 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
araghav
PostPosted: Wed Jul 10, 2002 11:05 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Design question on Dispacter
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.