activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chago <>
Subject Re: Looking for Help ActiveMQ and Jetty
Date Fri, 07 Sep 2007 03:27:24 GMT

Try this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    <script type="text/javascript" src="amq/amq.js"></script>
	<script type="text/javascript">

		var myHandler = {
			rcvMessage: function(message) {
				alert("received " + message);

		var dest = 'channel://gnip';
		//var dest = 'topic://gnip';

		function listen() {
			amq.addListener('gnip', dest, myHandler.rcvMessage);

		function sendMsg() {
			amq.sendMessage(dest, "<message item='hello'/>");
			alert("message sent");
	<input type="button" value="Listen" onclick="listen()"/>
	<input type="button" value="Fire one" onclick="sendMsg()"/>


I added the listen code to a handler that gets called when the listen button
is pressed. I am using a modified version of amq.js, and when I ran your
code against my copy I never received a response to my listen POST request.

It appears to be some kind of timing issue. The code above works on my

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

View raw message