• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can't receive hornetq jms message

 
Prateek Kumar Singh
Ranch Hand
Posts: 30
Eclipse IDE Hibernate Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i'm using hornetq with Tomcat 7.0 JMS my message sint successfully but could not recive it.

session.createQueue(queueName, queueName,true);
session.start();
ClientConsumer consumer = session.createConsumer("queue1");

System.out.println("ClientSession started!");
ClientMessage cmessage=null;
while (true) {//inner loop
System.out.println("in loop:"+consumer);
cmessage = consumer.receive(); // problem is here

System.out.println("message=="+cmessage);
System.out.println(cmessage.getBodyBuffer().readString());
pw.print(cmessage.getStringProperty("RepositoryName"));
System.out.println(cmessage.getStringProperty("FormName").toString());
}
//QueueUtil.receiveMessages("MWS1");

//new Consumer().consumerMsg();
pw.print("<h1>Message receive complete</h1>");
}


can anybody give answer?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic