[rabbitmq-discuss] RabbitMQ Flex subscriber

Pete Kay petedao at gmail.com
Wed Aug 27 09:09:22 BST 2008


Hi Ben,

I simplified my code significantly by using SubscribeClient class.  Thanks
for the great help.

However, I am still getting "Calling handleForcedShutdown from connection
forceClose called".

Here is the code I am using.  By the way, I am assuming the first argument
for .subscribe() refers to the routing key.

        public function init():void {
   trace("test sub init");
            connection = new Connection(buildConnectionState());
    subClient = new SubscribeClientImpl(connection);
    //         subClient.serializer = serializer;
            subClient.exchange = "";
            subClient.exchangeType = "topic";
         subClient.subscribe("SimpleQueue", onMessageArrive);
            subClient.subscribe("SimpleQueue", onMessageArrive);
         }
         public function buildConnectionState():ConnectionState {
             var state:ConnectionState = new ConnectionState();
             state.username = "guest";
             state.password = "guest";
             state.vhostpath = "/";
             state.serverhost = "192.168.1.104";
             return state;
         }
         public function onMessageArrive(event:CorrelatedMessageEvent):void
{
               trace("Consumed message from ABC");
               var o:* = event.result;
              trace("message = " + o.msg);
         }

Any idea why I can't connect?

Thanks alot for your help.

Best Regards,
Anne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20080827/55e4dc65/attachment.htm 


More information about the rabbitmq-discuss mailing list