activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kvbisme <>
Subject addListener doesn't receive messages
Date Fri, 26 Jun 2009 16:26:33 GMT

So I am trying to set up a sample showing ActiveMQ’s messaging capabilities. 
In particular when I saw the Ajax listener I got excited because this is
exactly what I needed.  

Anyway I set up a VERY simple example using the samples on the WIKI and I am
having issues.  What am I possibly missing?

I have a simple HTML page that accepts a text and then sends it to ActiveMQ
and I have a listener waiting to alert me when it comes in.  

I have ActiveMQ embedded in my test, and looking at the JMX Console I see
the listener getting registered and I see the message(s) getting loaded into
my topic.  The wiring doesn’t look like it should be difficult, but for some
reason I get no message :,(

This doesn’t look like it should be so difficult … can anyone give me some

I am using Tomcat 5.5.27 for my environment and Java 1.6.0_14.





var ActiveMQHandler =
  receive: function(msg)
	alert("Receiving Message: " + msg);
	var mr = new MessageRecord({time:new Date().toString(),msg:msg});

amq.addListener("88", 'topic://test.route', ActiveMQHandler.receive);


handler: function(button, event) {
    var m = sendTab.findById("messageToSend").getValue()
    amq.sendMessage("topic://test.route", m);
    var mr = new MessageRecord({time:new Date().toString(),msg:m});


<script type="text/javascript" src="amq/amq.js"></script>
<script type="text/javascript">amq.uri='/amqtest/amq';</script>

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message