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 » Problem in Puttine mesasge to message queue

Post new topic  Reply to topic
 Problem in Puttine mesasge to message queue « View previous topic :: View next topic » 
Author Message
nandu
PostPosted: Wed Feb 09, 2005 1:43 pm    Post subject: Problem in Puttine mesasge to message queue Reply with quote

Newbie

Joined: 09 Feb 2005
Posts: 9

I am using following code for putting message to mesasge queue through VB.NET. Everything works fine but when I check the queue no messages there . Please guide me where I am going wrong or is it a queue set up problem.

Try
mqQMgr = mqSession.AccessQueueManager(qmgrName)
If mqSession.CompletionCode = MQCC_OK Then
Put_queue = Put_Queue_Name
mqQueue = mqQMgr.AccessQueue(Put_queue, MQOO_OUTPUT + MQOO_FAIL_IF_QUIESCING + MQOO_INQUIRE)
If mqSession.CompletionCode = MQCC_OK Then
ObjMqMsg = mqSession.AccessMessage()
ObjMsgOpts = mqSession.AccessPutMessageOptions()
ObjMqMsg.MessageData = strparm
ObjMqMsg.Version = MQMD_VERSION_2
ObjMqMsg.Format = MQFMT_STRING
ObjMqMsg.Expiry = -1
ObjMqMsg.ReplyToQueueManagerName = qmgrName
ObjMqMsg.ReplyToQueueName = Get_Queue_Name
ObjMqMsg.CorrelationId = corr_id
mqQueue.Put(ObjMqMsg, ObjMsgOpts)
If mqSession.CompletionCode = MQCC_OK Then
mqQMgr.Commit()
PutMessage = True
Else
strErrorMessage = "Put failed. Completion: " & mqSession.CompletionCode & " Reason: " & mqSession.ReasonCode & " " & mqSession.ReasonName
End If
Else
strErrorMessage = "AccessQueue failed. Completion: " & mqSession.CompletionCode & " Reason: " & mqSession.ReasonCode & " " & mqSession.ReasonName
End If

mqQueue.Close()
ObjMqMsg = Nothing
ObjMsgOpts = Nothing
mqQueue = Nothing
Else
strErrorMessage = "AccessQueueManager failed. Completion: " & mqSession.CompletionCode & " Reason: " & mqSession.ReasonCode & " " & mqSession.ReasonName
End If
Catch ex As Exception
Debug.WriteLine(ex.Message)
End Try[/b]
Back to top
View user's profile Send private message
csmith28
PostPosted: Wed Feb 09, 2005 3:00 pm    Post subject: Reply with quote

Grand Master

Joined: 15 Jul 2003
Posts: 1196
Location: Arizona

@ nandu, welcome to MQSeries.net.

This is the wrong forum for a post of this nature.

Don't repost it though. A Moderator will move it to General MQSeries Support later.

Now on to your problem. What is the output of the Exception you are getting? Specifically, what is the WMQ Return or "Reason" Code?

I am not to Programmer but unless you have substituted the MQManager Name and the Queue names in the code you posted it won't work unless the actual MQManager and Queue names are "qmgrName, Put_Queue_Name and Get_Queue_Name respectively." Or atleast I don't think they will.

It may also be good to post OS/Level and WMQ Version.
_________________
Yes, I am an agent of Satan but my duties are largely ceremonial.


Last edited by csmith28 on Thu Feb 10, 2005 12:16 am; edited 1 time in total
Back to top
View user's profile Send private message
kevinf2349
PostPosted: Wed Feb 09, 2005 3:59 pm    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

nandu

I believe the problem is that you are trying to put the message onto the queue under syncpoint. Try specifying no syncpoint on the Put Message Options. I would post you some code but I am not on my VB.Net machine at the moment. I will post it tomorrow unless you solve it before then.

Kevin


Last edited by kevinf2349 on Thu Feb 10, 2005 5:29 am; edited 1 time in total
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Wed Feb 09, 2005 11:10 pm    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

Moving...
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
kman
PostPosted: Mon Feb 14, 2005 9:52 pm    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2003
Posts: 309
Location: Kuala Lumpur, Malaysia

nandu said 'Everything works fine'. I take it that there was no error. The message is successfully put to the queue name named in Put_queue.
I would imagine nandu is looking at a wrong queue for the message he just put. Otherwise it should be there in the queue.
And I don't think the syncpoint changes anything here, if everything works fine. Since the commit was asked when MQCC_OK.

User error?
Back to top
View user's profile Send private message Yahoo Messenger
kevinf2349
PostPosted: Tue Feb 15, 2005 8:35 am    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

Whoops...my bad...I failed to see the commit in there
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Feb 15, 2005 2:32 pm    Post subject: Reply with quote

Grand High Poobah

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

Stop the channel and check if the message appears in the xmitq.
You will not see the message anywhere on the qmgr if the channel is running or inactive and triggered as it gets immediately forwarded to its destination...

If you are working with only one qmgr make sure the queue you are putting the message on is local, not being serviced and not being triggered. Otherwise the message will disappear (be consumed) just as fast as you can put it.

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 » General IBM MQ Support » Problem in Puttine mesasge to message queue
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.