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 Telemetry / Low Latency Messaging / Everyplace » Unable to transfer message from on Queue to Other

Post new topic  Reply to topic
 Unable to transfer message from on Queue to Other « View previous topic :: View next topic » 
Author Message
kabra
PostPosted: Sun Jul 25, 2004 11:20 pm    Post subject: Unable to transfer message from on Queue to Other Reply with quote

Newbie

Joined: 25 Jul 2004
Posts: 1
Location: Bangalore

Hi All,

I Completely new to MQ Series , but have to jump directly into Coding. I have a written downloaded some code from the net. But a part of it does not work. This is what I am trying to do and the status for the same.

1. Connect to MQ --- Working
2. Put Message on a First Queue -- Working (Request Queue)
3. Transfer Message from First Queue to Second Queue -- NOT WORKING
4. GET Message from Second Queue and dislay -- Partially working

In case of 4 , I am trying to copy the message from First Q to the Second one using FirstQ.ReplyQueue = SecondQ. But it does not work

Here is the code Snippet

try
{

//Console.WriteLine("Enter request text: ");
string line = msg;
MQMessage requestMessage = new MQMessage();
requestMessage.WriteString(line);
requestMessage.Format = MQC.MQFMT_STRING;
//requestMessage.MessageType = MQC.MQMT_REQUEST;
requestMessage.MessageType = MQC.MQMT_REPLY;

//requestMessage.ReplyToQueueManagerName=mqQMgr.Name;
requestMessage.ReplyToQueueName = responseQueueName;



MQMessage responseMessage = new MQMessage();

responseMessage.MessageType = MQC.MQMT_REPLY;

requestQueue.Put(requestMessage); // put request message
requestMessage.CorrelationId = requestMessage.MessageId; // response correlation id has to match
responseMessage.MessageId=requestMessage.MessageId;
//requestMessage.Report = MQC.MQRO_COPY_MSG_ID_TO_CORREL_ID;
// the request message id //commented
//responsemessage.
MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.Options = MQC.MQGMO_WAIT; // tell get to wait
gmo.WaitInterval = 15 * 1000; // tell get to wait up to 60 seconds
//gmo.MatchOptions = MQC.MQMO_MATCH_CORREL_ID;
requestQueue.Close();
try
{

responseQueue.Get(responseMessage, gmo );
response message
line = responseMessage.ReadString(responseMessage.MessageLength);
return line;

}

catch (MQException mqe)
{
String mText = mqrcText.getMQRCText(mqe.Reason);
//Message Queue is Empty
if ( mText.Equals("MQRC_NO_MSG_AVAILABLE"))
{
// special report for normal end
message="No more messages on Reply queue";
//System.Console.ReadLine();
return message;
}








Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
bower5932
PostPosted: Mon Jul 26, 2004 7:29 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Is this question specific to WMQe (everyplace)? If not, I'd suggest that you try posting it in the API Support section. You'll have a better chance of getting an answer.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Telemetry / Low Latency Messaging / Everyplace » Unable to transfer message from on Queue to Other
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.