Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

IBM MQ JMS post issues  RSS feed

 
Sireesh Ganagam
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,


I wrote stand alone program to post message to IBM MQ , not sure if it posted to queue i see these Another 2,102 character(s) omitted is that mean it didnt post complete message? do i have to increase capacity of text size please suggest me.



JMS Message class: jms_text
JMSType: null
JMSDeliveryMode: 2
JMSExpiration: 0
JMSPriority: 4
JMSMessageID: ID:414d512042454c4b2e4d49462e514d47ad662c5420128a02
JMSTimestamp: 1413500135480
JMSCorrelationID:null
JMSDestination: queue:///A.QUEUE
JMSReplyTo: null
JMSRedelivered: false
JMS_IBM_PutDate:20141016
JMSXAppID:WebSphere MQ Client for Java
JMS_IBM_PutApplType:28
JMSXUserID:Administrato
JMS_IBM_PutTime:22553556
JMSXDeliveryCount:0
<?xml version="1.0"?>
<tXML>
<Header>
<Source>Blue</Source>
<Action_Type>Create</Action
Another 2,102 character(s) omitted




import javax.jms.JMSException;
import javax.jms.Session;

import com.ibm.jms.JMSMessage;
import com.ibm.jms.JMSTextMessage;
import com.ibm.mq.jms.JMSC;
import com.ibm.mq.jms.MQQueue;
import com.ibm.mq.jms.MQQueueConnection;
import com.ibm.mq.jms.MQQueueConnectionFactory;
import com.ibm.mq.jms.MQQueueReceiver;
import com.ibm.mq.jms.MQQueueSender;
import com.ibm.mq.jms.MQQueueSession;


public class SimpleP2P {
/**
* Main method
*
* @param args
*/
public static void main(String[] args) {
try {
MQQueueConnectionFactory cf = new MQQueueConnectionFactory();




cf.setHostName("xyz.com");
cf.setPort(141600);
cf.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
cf.setQueueManager("QMG");
cf.setChannel("CHANNEL");


MQQueueSession session = (MQQueueSession) connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
MQQueue queue = (MQQueue) session.createQueue("queue:///A.QUEUE");
MQQueueSender sender = (MQQueueSender) session.createSender(queue);

long uniqueNumber = System.currentTimeMillis() % 1000;
String fileText = convertXMLFileToString("test.xml");
System.out.println("fileText "+fileText);

JMSTextMessage message = (JMSTextMessage) session.createTextMessage(fileText);


connection.start();

System.out.println("before Sent message:\\n" + message);

sender.send(message);
System.out.println("Sent message:\\n" + message);

sender.close();

session.close();
connection.close();

System.out.println("\\nSUCCESS\\n");
}
catch (JMSException jmsex) {
System.out.println(jmsex);
System.out.println("\\nFAILURE\\n");
}
catch (Exception ex) {
System.out.println(ex);
System.out.println("\\nFAILURE\\n");
}
}
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's some kind of log entry you're looking at? I wouldn't rely on that for accurate information about what happened. Why not set up a proper test environment and run some tests?
 
Sireesh Ganagam
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is my stand alone test program. Here my question is Another 2,102 character(s) omitted is an error? , it didnt post message complete message because of size limit? , do i have to change something in my program
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!