Posted: Tue Dec 23, 2008 4:14 am Post subject: RFH appearing in 'Message Data'
Novice
Joined: 21 Jun 2007 Posts: 24
Hello,
I am developing a standalone Java application that puts a message onto a queue. I am able to put the message on the queue locally (i.e. within IBM Websphere MQ) and read the message. However when I send a message (TextMessage) from my standalone Java application and view it in Websphere MQ it comes out as 'RFH'.
From looking on the internet I gather that the message will be either MQHRF2 or MQSTR and I assume I should be using the latter. Can anyone help please?
// Use generic MessageProducer instead of Queue/Topic Producer
MessageProducer myProducer = session.createProducer(myDest);
// Get user input and create messages. Loop until user sends CR.
System.out.println( "\nSending messages to" + myDest.toString() +
"\nEnter a blank line to quit.\n");
do {
byte[] input = new byte[80];
System.out.print("Enter a message to send: ");
System.in.read(input);
outString = (new String(input, 0, input.length)).trim();
if (outString.length() > 0) {
TextMessage outMessage = session.createTextMessage();
outMessage.setText(outString);
myProducer.send(outMessage);
System.out.print("***outMessage: "+outMessage);
session.commit();
}
} while (outString.length() > 0);
..but I am not creating a Queue object as such. How can I get around this?
Thank you.
You have to send the message to a Destination. What type of destination are you creating? You are talking about putting the message onto a queue right?
By the way you can skip the MQ cast and target client set if you use:
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