GouthamAnand
asked on
What is the best way to pull the messages from MQ queue.
I have written a C# Win service to pull the messages from Websphere MQ queue. I have a question here on the approach to be followed.
1. Open the connection only once to the queue and pull all the messages and keep checking for the messages forever and never close the connection.
2. Establish the connection to queue and then pull the message and then close it immediately. And do the same for every message.
What is the best way? And why?
I have opeted the 2nd one, but one of my friend suggest the 1st one. Please suggest me which is the best way.
1. Open the connection only once to the queue and pull all the messages and keep checking for the messages forever and never close the connection.
2. Establish the connection to queue and then pull the message and then close it immediately. And do the same for every message.
What is the best way? And why?
I have opeted the 2nd one, but one of my friend suggest the 1st one. Please suggest me which is the best way.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Why would you design-in poor performance to an application?
Reliability first !
ASKER
Thanks a lot to every one for replying to my question.