activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pete Kay" <>
Subject Having problem listening for Activemq message from Ajax
Date Sun, 23 Nov 2008 06:37:28 GMT

I followed the integration doc on the jetty website and I am able to send
message from javascript to activemq, but when I fire a message to ActiveMQ,
the ajax code is not able to response to any incoming message.

>From the ActiveMQ, I can see that the message is being sent to ActiveMQ no
problem.  I also see that the addListener does cause a new consumer added,
but this new consumer gets removed right after the page is finished

It does not seem like there is any waiting or polling going on.  Does anyone
know why?  I am using Jetty 6.

Here is my code.    When this code is run, the rcvMessage function is never

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

var myHandler =
  rcvMessage: function(message)

     alert("received ");
function message()

alert("start listen");
alert("after listen");

amq.sendMessage("topic://test","this is my test");



<body onload="message()">

<script type="text/javascript">



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message