Hi, all
I wrote a API EXIT for WebSphere MQ 7 on Windows, when I put to or get from queue a simple message from command line like: "amqsput" or "amqsget", I would get some log files containing information like time, message data, queue name, etc.
That's what I expect for my test program writen in Java, but when I used code below:
MQMessage msg = new MQMessage();
msg.writeUTF("Hello, World!");
MQPutMessageOptions pmo = new MQPutMessageOptions();
queue.put(msg, pmo);
I got blank log file. Then I used code below:
MQMessage msg = new MQMessage();
msg.writeString("Hello, World!");
MQPutMessageOptions pmo = new MQPutMessageOptions();
queue.put(msg, pmo);
Then I saw familar data in log file.
I opened MQ explorer, I saw two messages in "Message Browser":
Hello, World!
%Hello, World!
I'm totally lost here, where is this "%" from? My api exit didnot record the put action because of the encoding?
Any advices would be appreciated! Thank you!