Author |
Message
|
asr2002 |
Posted: Fri Oct 25, 2002 8:24 am Post subject: very urgent ...help please |
|
|
Novice
Joined: 09 Sep 2002 Posts: 13
|
i'm putting an message using mqseries client application say if i'm putting 00009 but i see in the queues as ..00009 or .@00009 i tried to get the message back using rfhutil i get the same as seen in the queue...
i appreciate if some one can tell me what's happening when i put a message in the queue...
Thanks in advance
Last edited by asr2002 on Tue Oct 29, 2002 8:28 pm; edited 1 time in total |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Oct 25, 2002 12:14 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I'm not sure that I understand 100% of what you are doing, but it sounds like you are comparing the actual data that you put against what is on the queue. The data that you put is just a piece of what ends up on the queue. Depending on how you are looking at the data, you are probably seeing some of the MQMD being displayed as '...' because they are unprintable characters. Try using the amqsbcg sample to look at your message. It puts your data at the very bottom. |
|
Back to top |
|
 |
asr2002 |
Posted: Fri Oct 25, 2002 3:49 pm Post subject: |
|
|
Novice
Joined: 09 Sep 2002 Posts: 13
|
thanks, brower u r right i'm comparing my message once it is put in the queue, so now i understand always it is not necessary that we see that same message once it's in the queue.... now i tried to retrieve the message , even though i see some unknow characters before my message in the queue i'm able to retrieve properly as i want... |
|
Back to top |
|
 |
leongor |
Posted: Sun Oct 27, 2002 2:03 am Post subject: |
|
|
 Master
Joined: 13 May 2002 Posts: 264 Location: Israel
|
Do you use java client ?
Because if you took the default example then I think they use string with the length ( in the beginnig of the string ).
Just check the string type of your message. _________________ Regards.
Leonid.
IBM Certified MQSeries Specialist. |
|
Back to top |
|
 |
asr2002 |
Posted: Tue Oct 29, 2002 8:25 pm Post subject: very urgent ...help please |
|
|
Novice
Joined: 09 Sep 2002 Posts: 13
|
hi leonid,
i dont understand what u said, i have written a java program ie, java client.. using java client i put a messge in a queue say if i put a message testing , when i see the put message in the queue it shows 2 extra character and not msg lenght is 9 character... i dont want to happen that... i need to put exactly what i'm putting...
please, any help is appreciated...
here is my put msg code:
QueueManager = new MQQueueManager(sQMgrName);
int pmoOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_PASS_ALL_CONTEXT | MQC.MQOO_OUTPUT | MQC.MQOO_SET_ALL_CONTEXT;
putQueue =
queueManager.accessQueue(
sQPutValName,
pmoOptions,
null,
null,
null);
MQMessage message = new MQMessage();
sMsgId = new String("222");
byte[] sMsgId1 = new byte[24];
sMsgId1 = sMsgId.getBytes();
message.messageId = sMsgId1;
MQPutMessageOptions putOpt = new MQPutMessageOptions();
putOpt.options = MQC.MQOO_SET_IDENTITY_CONTEXT;
message.clearMessage();
message.applicationIdData = sAppIdData;
message.writeUTF(sMsg);
message.format = "MQSTR";
putQueue.put(message, putOpt);
putQueue.close(); |
|
Back to top |
|
 |
leongor |
Posted: Wed Oct 30, 2002 1:58 am Post subject: |
|
|
 Master
Joined: 13 May 2002 Posts: 264 Location: Israel
|
I mean you use message.writeUTF method that adds message length at the beginning of string. Just switch to writeString method.
It'll fix your problem. _________________ Regards.
Leonid.
IBM Certified MQSeries Specialist. |
|
Back to top |
|
 |
asr2002 |
Posted: Wed Oct 30, 2002 7:57 am Post subject: |
|
|
Novice
Joined: 09 Sep 2002 Posts: 13
|
thanks a lot... it's working |
|
Back to top |
|
 |
|