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 API Support » Accessing MQMD from vb.net

Post new topic  Reply to topic
 Accessing MQMD from vb.net « View previous topic :: View next topic » 
Author Message
shilpasarnobat
PostPosted: Thu May 12, 2005 10:23 am    Post subject: Accessing MQMD from vb.net Reply with quote

Newbie

Joined: 12 May 2005
Posts: 2

I am using amqmdnet.dll
when i try to put a message it gets posted on the server and then is immediately deleted from the Queue on the server.
this happens only if i am setting a header to that message but if i send a message without header it is posted properly
can anyone tell me wht could be the problem
Back to top
View user's profile Send private message
kevinf2349
PostPosted: Thu May 12, 2005 10:35 am    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

What do you mean by 'setting a header'? Do you mean you are trying to add the Message descriptor yourself?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu May 12, 2005 10:38 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Also, what do you mean by "Deleted from the server"?

Do you mean "rolled back"? Or "put on the dead letter queue"?

Does your MQPUT or equivalent give you a bad reason code?

Are you checking reason codes?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
shilpasarnobat
PostPosted: Thu May 12, 2005 10:44 am    Post subject: Reply with quote

Newbie

Joined: 12 May 2005
Posts: 2

when i am using only

mqQueue.Put(mqMsg, mqPutMsgOpts)

message is send to server and i get appropriate count using this method mqQueue.CurrentDepth()

but when i set the header of the message using following method



mqMsg.messageType = MQC.MQMT_DATAGRAM
mqMsg.replyToQueueName = mqQueue.Name
mqMsg.replyToQueueManagerName = mqQMgr.Name
mqMsg.correlationId = Encoding.UTF8.GetBytes("C03434557_111424564")
mqMsg.expiry = 3
mqMsg.persistence = 1

mqQueue.Put(mqMsg, mqPutMsgOpts)


immediately after the put for a sec i will get the right count and checked the server the message appears for a sec then disappears and my count goes back to inital number of messages i am not understanding why this is happening
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu May 12, 2005 10:49 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Please go look at sample code to determine how to verify that the Put returned a good reason and completion code.

Also, please do not depend on message depths to confirm that you successfully put a message.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu May 12, 2005 12:54 pm    Post subject: Reply with quote

Grand High Poobah

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

shilpasarnobat wrote:
when i am using only
..................
mqMsg.expiry = 3
.................


This is your culprit. Your message expires before you have the time to read it. !! Expired messages get removed on get or browse from the queue.

Enjoy
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Accessing MQMD from vb.net
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.