Author |
Message
|
AnnRon |
Posted: Mon Aug 16, 2004 10:27 am Post subject: MQ is getting unreadable message back from Queue |
|
|
Newbie
Joined: 16 Aug 2004 Posts: 3
|
[
Hi,
I am trying to put a message on the queue and get a response back for it. While the message that I send across seems to go across fine and the MQ administrator told me that the message format looks good his end.The problem occurs when I try to do a "get", I get back junk when I print it to the log in Domino Notes. This is supposed to populate fields in Notes and for some reason in the log it shows up as junk while the MQ admin guy says he is sending back message in the correct format..
Anybody else faced this problem and let me know what I can do to solve it. This is how it looks like
get msg is : +ë!ꀀ€€ï!î+ë!€€€€€€€€€€€€€€€€€€€€€€€€€€€‘‘‘‘˜–˜€€€€€€€€€€€€€€€€€€€€€€ã– ™ ––“ààà˜˜–•–áä ••ä˜áã(!“‘‘•‘‘(!(!(ç&““‘‘.ê!áå(€€€€€€€€€€€€€€€€€€€€€€€€èáëèñ+å€!ã€(ñë䀀€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€@ÿ:EVĖÿ:EVĖ■
Any help is appreciated,
Thanks,
Ann _________________ Ann Ron. |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Aug 16, 2004 11:12 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I'd be interested in looking at amqsbcg output of the message and specifically the Format of the message. My guess would be that this is set incorrectly and is affecting conversion. |
|
Back to top |
|
 |
EddieA |
Posted: Mon Aug 16, 2004 11:24 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
My guess would be that this is set incorrectly and is affecting conversion. |
Or the GET doesn't specify With Convert.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
AnnRon |
Posted: Mon Aug 16, 2004 12:50 pm Post subject: |
|
|
Newbie
Joined: 16 Aug 2004 Posts: 3
|
This is the code which gets the message back from the queue.
Code: |
openOptions = MQC.MQOO_INPUT_SHARED | MQC.MQOO_FAIL_IF_QUIESCING;
GetQueue = QueueManager.accessQueue(GetQueueName,openOptions,"","","");
GetMessageOptions = new MQGetMessageOptions();
GetMessageOptions.options = MQC.MQGMO_NO_SYNCPOINT;
Message = new MQMessage();
[b]GetQueue.get( Message,GetMessageOptions );[/b]
System.out.println(" Message gotten from Queue is : " + Message);
System.out.println("inside While loop after get call");
msglength = essage.getMessageLength( );
System.out.println(" message length after get is : " + msglength );
getmsg = Message.readString(msglength);
System.out.println(" get msg is : " + getmsg );
|
_________________ Ann Ron. |
|
Back to top |
|
 |
AnnRon |
Posted: Mon Aug 16, 2004 12:55 pm Post subject: |
|
|
Newbie
Joined: 16 Aug 2004 Posts: 3
|
Since I am not an MQ administrator, I dont know what an amqsbgc output means... Nor does my MQ admin guy..sorry. could you be a little more descriptive.
This is the exact format of the message I get back as printed on the log, not as sent from the queue though...
message length after get is : 11305
08/16/2004 13:37:31 HTTP JVM: get msg is : +ë!ꀀ€€ï!î+ë!ꀀ€€€€€€€€€€€€€€€€€€€€€€€€€€€‘‘‘‘˜–˜€€€€€€€€€€€€€€€€€€€€€€ã– ™ ––“ààà˜˜–•–áä ••ä˜áã(!“‘‘•‘‘(!(!(ç&““‘‘.ê!áå(€€€€€€€€€€€€€€€€€€€€€€€€èáëèñ+å€!ã€(ñë䀀€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€@ÿ:EVĖ■ _________________ Ann Ron. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Mon Aug 16, 2004 1:45 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
Change your GMO options line to (so that it does a get with convert):
Code: |
GetMessageOptions.options = MQC.MQGMO_NO_SYNCPOINT + MQC.MQGMO_NO_WAIT + MQC.MQGMO_FAIL_IF_QUIESCING + MQC.MQGMO_CONVERT; |
Also, you might want to get a little training for yourself and your MQ Admin or hire an outside MQ consultant for a few weeks to get you over these humps.
amqsbcg and amqsbcgc (c for client mode) is one of many tools installed with the standard MQ server package. You run it from the command line (DOS Prompt). Look in your <MQPATH>\Tools\C\Samples\bin directory.
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
santhosh_fischer |
Posted: Wed Aug 18, 2004 4:07 am Post subject: See this.... |
|
|
Novice
Joined: 05 Aug 2004 Posts: 13
|
hi ..
what type of message objet are you putting in the queue??
if u are not specifiying anything..
try putting a textmessage in the queue.
using object of TextMessage
as this
TextMessage message;
message.setText(your_message_string)
now send message
and when retrieving
type cast message to TextMessage
and then use message.getText to print the matter..
it will work
or ask me i can give u some code frags..ok
Santhosh |
|
Back to top |
|
 |
|