activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stratio <>
Subject Problem with Ajax API
Date Tue, 21 Dec 2010 15:54:18 GMT

Hello I'm experimenting a new trouble :(

I'm still using ActiveMQ 5.4.2 on Windows 7. I'm running a Ruby client which
creates a topic named "/topic/ActiveMQFeed" using Stomp Protocol and publish
on it a message every 3 seconds.

I've created a client using javascript with Websocket over Stomp and it
works ;)

Now I would like to create a client using Ajax API without webSocket. 

I saw this page to learn the Ajax API
and i wrote this code :

<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="amq_jquery_adapter.js"></script>
<script type="text/javascript" src="amq.js"></script>

var amq = org.activemq.Amq;
amq.init({ uri: 'amq', logging: true, timeout: 45 });

var testHandler = function(message) {
    		alert("received "+message);

amq.addListener("test", "topic://topic/ActiveMQFeed", testHandler);

Now if i run this code i don't see anything on the browser and on the Chrome
Javascript debugger i get this error :

"Error occurred in poll. HTTP result: 0, status: parsererror"

What does this error depend on? Is it the uri the problem or what?

Thanks in advance for you help.

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

View raw message