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 » General IBM MQ Support » .NET Code eating two message for single GET call.

Post new topic  Reply to topic
 .NET Code eating two message for single GET call. « View previous topic :: View next topic » 
Author Message
AnandZadbuke
PostPosted: Wed Feb 16, 2011 11:02 pm    Post subject: .NET Code eating two message for single GET call. Reply with quote

Newbie

Joined: 16 Feb 2011
Posts: 3

ddd

Last edited by AnandZadbuke on Thu Feb 17, 2011 4:54 am; edited 1 time in total
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Feb 17, 2011 12:35 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

I don't know enough to answer your question, but if you are using WMQ V7.0 and an unmanaged client don't do this:

Code:
Hashtable props = new Hashtable();
props.Add(MQC.HOST_NAME_PROPERTY, "U4VMMQNP109(1414)");
props.Add(MQC.CHANNEL_PROPERTY, "CSM.SVRCONN.01");


Use the mqclient.ini file in conjunction with a CCDT, or at least externalise the details into an editable file, even for a test application because then it's transportable.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Feb 17, 2011 1:15 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

same for any MQ object name such as queue name, put in somewhere external to the code.

Setting format before a get does nothing. The format is in the message MQMD.

You shoud use MQGMO_CONVERT on all string messages.

Don't open the queue for each GET (put the open before the GET loop).

Close the queue after you have finished doing the GET loop.

Disconnect from the queue manager after the close.

Check the buffer size you provide for the get. It's likely that you have only part of the message if it's too small.

Try not using SYNCPOINT to see if that fixes it - if it does your commit logic is wrong.

Lots of things to fix before trying again. MQ does not get two messages for one get - you can be sure of that.
Back to top
View user's profile Send private message
AnandZadbuke
PostPosted: Thu Feb 17, 2011 1:29 am    Post subject: Worst part is - t works on my WINDOWS 7 and not on 2008 SVR Reply with quote

Newbie

Joined: 16 Feb 2011
Posts: 3

Same code works very fine on my WIN7 machine and not on WIN2008 server
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Feb 17, 2011 2:27 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

zpat wrote:
Don't open the queue for each GET (put the open before the GET loop).



Otherwise if you see different behavior on one machine than on another for "the same" code, then either it's not the "same" code somehow, or there's something wrong with one of the machines.

Are you using a full MQ Client install in each case, or are you copying DLLs?

Are you rebuilding your app for 64bit ?

Do you see the same behavior with the nmqsget sample?
Back to top
View user's profile Send private message
AnandZadbuke
PostPosted: Thu Feb 17, 2011 2:56 am    Post subject: If I put small msg it work everywhere msg size 430KB fails Reply with quote

Newbie

Joined: 16 Feb 2011
Posts: 3

If I put small msg it work everywhere - msg size 430KB it fails despite the max lenth is 4 MB for the messge for the queue.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Feb 17, 2011 7:22 am    Post subject: Re: If I put small msg it work everywhere msg size 430KB fai Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

AnandZadbuke wrote:
If I put small msg it work everywhere - msg size 430KB it fails despite the max lenth is 4 MB for the messge for the queue.

Are you using the latest version (V7.0.1.4)?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
zpat
PostPosted: Thu Feb 17, 2011 9:48 am    Post subject: Re: Worst part is - t works on my WINDOWS 7 and not on 2008 Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

AnandZadbuke wrote:
Same code works very fine on my WIN7 machine and not on WIN2008 server


The errors I have pointed out need fixing. Whether or not it appears to work there are some very bad coding practices in your code. Not to correct these would be unwise.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Feb 17, 2011 9:53 am    Post subject: Re: If I put small msg it work everywhere msg size 430KB fai Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

AnandZadbuke wrote:
If I put small msg it work everywhere - msg size 430KB it fails despite the max lenth is 4 MB for the messge for the queue.


Then you have a problem with your buffer and a problem with your error handling.

The other problem is that you've edited your first post to remove all the details so newcomers like me are just guessing what you're saying.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » General IBM MQ Support » .NET Code eating two message for single GET call.
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.