<div dir="ltr"><div>Hi Ben,</div>
<div> </div>
<div>Thank you very much for your kind help. Here is my code:</div>
<div> </div>
<div><?xml version="1.0" encoding="utf-8"?><br><mx:Application xmlns:mx="<a href="http://www.adobe.com/2006/mxml">http://www.adobe.com/2006/mxml</a>" <br> layout="absolute" styleName="plain" creationComplete="init()"></div>
<div> <mx:Script><br> <![CDATA[<br> import org.amqp.patterns.impl.SubscribeClientImpl;<br> import org.amqp.patterns.SubscribeClient;<br> import org.amqp.Connection;<br> import org.amqp.ConnectionState;<br>
import org.amqp.patterns.CorrelatedMessageEvent;<br> import org.amqp.ProtocolEvent;<br> import org.amqp.Session;<br> import org.amqp.SessionManager;<br> import org.amqp.impl.SessionStateHandler;</div>
<div> private var subClient:SubscribeClientImpl;<br> protected var connection:Connection;<br> <br> private var serializer:JSONSerializer = new JSONSerializer();</div>
<div> public function init():void {<br> trace("test sub init");<br> connection = new Connection(buildConnectionState());<br> subClient = new SubscribeClientImpl(connection);<br> subClient.serializer = serializer;<br>
// subClient.realm = "/data";<br> subClient.exchange = "gamex";<br> subClient.exchangeType = "topic";<br> //sub.subscribe(...);<br> }<br> public function buildConnectionState():ConnectionState {<br>
var state:ConnectionState = new ConnectionState();<br> state.username = "guest";<br> state.password = "guest";<br> state.vhostpath = "/";<br> state.serverhost = "<a href="http://192.168.1.104">192.168.1.104</a>";<br>
return state;<br> }<br> <br> public function onMessageArrive(event:CorrelatedMessageEvent):void {<br> var o:* = event.result;<br> }<br> ]]><br> </mx:Script></div>
<div></mx:Application><br></div>
<div> </div>
<div> </div>
<div> </div>
<div>Best Regards,</div>
<div>Anne</div></div>