<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:v = "urn:schemas-microsoft-com:vml"><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19258">
<STYLE>@font-face {
        font-family: 宋体;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @宋体;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-STYLE: normal; FONT-FAMILY: Verdana; COLOR: windowtext; FONT-WEIGHT: normal; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY
style="MARGIN-TOP: 10px; FONT-FAMILY: verdana; MARGIN-LEFT: 10px; FONT-SIZE: 10pt; MARGIN-RIGHT: 10px">
<DIV><FONT color=#0000ff size=2 face=Verdana>
<DIV><FONT color=#0000ff size=2 face=Verdana>I using queue replace for topic,but
it still failed.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff>send.html:</FONT></DIV>
<DIV>
<DIV><FONT color=#000000><body lang="en"></FONT></DIV>
<DIV><FONT
color=#000000> <h1>Send Message</h1></FONT></DIV>
<DIV><FONT color=#000000> </FONT></DIV>
<DIV><FONT
color=#000000> <script> </FONT></DIV>
<DIV><FONT
color=#000000> // Stomp.js boilerplate</FONT></DIV>
<DIV><FONT
color=#000000> WebSocketStompMock = SockJS;</FONT></DIV>
<DIV><FONT color=#000000></FONT></DIV>
<DIV><FONT
color=#000000> var client = Stomp.client('http://127.0.0.1:55674/stomp'); </FONT></DIV>
<DIV><FONT
color=#000000> client.connect("guest","guest",function(x){</FONT></DIV>
<DIV><FONT
color=#000000> document.write(x);</FONT></DIV>
<DIV><FONT color=#000000> });</FONT></DIV>
<DIV><FONT color=#000000></FONT></DIV>
<DIV><FONT
color=#000000> function send()</FONT></DIV>
<DIV><FONT color=#000000> {</FONT></DIV>
<DIV><FONT
color=#000000> client.send('/queue/test', {}, document.form1.msg.val);</FONT></DIV>
<DIV><FONT
color=#000000> } </FONT></DIV>
<DIV><FONT color=#000000> </script></FONT></DIV>
<DIV><FONT color=#000000></FONT></DIV>
<DIV><FONT
color=#000000> <form id="form1" method="post" name="form1" action="""></FONT></DIV>
<DIV><FONT color=#000000> input
msg:<input id="msg" name="msg" type="text"/></FONT></DIV>
<DIV><FONT
color=#000000> <input name="Submit" type="submit" onclick="send();" value="send"></FONT></DIV>
<DIV><FONT
color=#000000> </form> </FONT></DIV>
<DIV><FONT color=#000000></FONT></DIV>
<DIV><FONT color=#000000></body></FONT></DIV>
<DIV> </DIV>
<DIV>
<DIV><FONT color=#0000ff>recv.html:</FONT></DIV>
<DIV><FONT color=#000000><body></FONT></DIV>
<DIV><FONT
color=#000000> <h1>Recv Message</h1></FONT></DIV>
<DIV><FONT color=#000000></FONT></DIV>
<DIV><FONT color=#000000> <script> </FONT></DIV>
<DIV><FONT
color=#000000> // Stomp.js boilerplate</FONT></DIV>
<DIV><FONT
color=#000000> WebSocketStompMock = SockJS;</FONT></DIV>
<DIV><FONT color=#000000></FONT></DIV>
<DIV><FONT
color=#000000> var client = Stomp.client('http://127.0.0.1:55674/stomp'); </FONT></DIV>
<DIV><FONT
color=#000000> client.connect("guest","guest",function(x){</FONT></DIV>
<DIV><FONT
color=#000000> id = client.subscribe("/queue/test", function(d) {</FONT></DIV>
<DIV><FONT
color=#000000> document.write(d.body);</FONT></DIV>
<DIV><FONT
color=#000000> });</FONT></DIV>
<DIV><FONT
color=#000000> }); </FONT></DIV>
<DIV><FONT color=#000000> </script></FONT></DIV>
<DIV><FONT color=#000000></FONT></DIV>
<DIV><FONT color=#000000></body></FONT></DIV></DIV></DIV></FONT></DIV>
<DIV><FONT size=2 face=Verdana></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT color=#808080>Best Regards!</FONT></DIV>
<DIV><FONT color=#808080>2012-06-13 14:30:59</FONT></DIV>
<DIV align=left>
<DIV align=left><FONT size=2 face=Verdana>
<HR style="WIDTH: 122px; HEIGHT: 2px" SIZE=2>
</FONT></DIV>
<DIV><FONT color=#c0c0c0><FONT size=2 face=Verdana></FONT></DIV>
<DIV><FONT size=2 face=Verdana>
<DIV></FONT></FONT><FONT size=2 face=Verdana>truelie
<HR>
</FONT></DIV></DIV></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>发件人:</STRONG> Matthias
Radestock</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>发送时间:</STRONG>
2012-06-13 04:43:49</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>收件人:</STRONG>
truelie</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>抄送:</STRONG>
rabbitmq-discuss</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2><STRONG>主题:</STRONG> Re: |Spam|
[rabbitmq-discuss] Help for RabbitMQ-Web-Stomp</FONT></FONT></DIV>
<DIV><FONT size=2 face=Verdana></FONT> </DIV>
<DIV><FONT size=2 face=Verdana>
<DIV>On 12/06/12 03:00, truelie wrote:</DIV>
<DIV>> I am testing for RabbitMQ-Web-Stomp,which send or receive message</DIV>
<DIV>> from browser. [...] Now, I write a send.html to send message,and a</DIV>
<DIV>> recv.html to receive message,but not success.</DIV>
<DIV></DIV>
<DIV>I see you are using topics...</DIV>
<DIV></DIV>
<DIV>> client.send('/topic/test', {}, document.form1.msg.val);</DIV>
<DIV> > [...]</DIV>
<DIV>> id = client.subscribe("/topic/test", function(d) {</DIV>
<DIV>> document.write(d.body);</DIV>
<DIV>> });</DIV>
<DIV></DIV>
<DIV>Did you start the receiver before the sender? If not then the sent </DIV>
<DIV>message will be lost.</DIV>
<DIV></DIV>
<DIV>You may want to use a queue destination instead. And you should probably </DIV>
<DIV>read http://www.rabbitmq.com/stomp.html#d to gain a broader </DIV>
<DIV>understanding of the various kinds of destinations and their semantics.</DIV>
<DIV></DIV>
<DIV>Regards,</DIV>
<DIV></DIV>
<DIV>Matthias.</DIV>
<DIV></DIV>
<DIV></DIV></FONT></DIV></BODY></HTML>