<div dir="ltr"><div>Hi Ben,</div>
<div> </div>
<div>I simplified my code significantly by using SubscribeClient class. Thanks for the great help.</div>
<div> </div>
<div>However, I am still getting "Calling handleForcedShutdown from connection forceClose called".</div>
<div> </div>
<div>Here is the code I am using. By the way, I am assuming the first argument for .subscribe() refers to the routing key. </div>
<div> </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.exchange = "";<br> subClient.exchangeType = "topic";<br> subClient.subscribe("SimpleQueue", onMessageArrive);<br> subClient.subscribe("SimpleQueue", onMessageArrive);</div>
<div> }<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>";</div>
<div> return state;<br> }<br> public function onMessageArrive(event:CorrelatedMessageEvent):void {<br> trace("Consumed message from ABC");<br> var o:* = event.result;<br>
trace("message = " + o.msg);<br> }<br></div>
<div> </div>
<div>Any idea why I can't connect?</div>
<div> </div>
<div>Thanks alot for your help.</div>
<div> </div>
<div>Best Regards,</div>
<div>Anne</div>
<div> </div></div>