Link to home
Start Free TrialLog in
Avatar of GouthamAnand
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.
SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Why would you design-in poor performance to an application?
Reliability first !
Avatar of GouthamAnand
GouthamAnand

ASKER

Thanks a lot to every one for replying to my question.