Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I'm new to amqp,can I use it like this? #3

Open
shapache opened this issue Apr 14, 2014 · 0 comments
Open

I'm new to amqp,can I use it like this? #3

shapache opened this issue Apr 14, 2014 · 0 comments

Comments

@shapache
Copy link

I'm new to amqp,I want connect flex to rabbitmq, and get get information from rabbitmq. I write code like this, but it donot work. Is this right?
help me please

protected function application1_creationCompleteHandler(event:FlexEvent):void
        {
            var param:ConnectionParameters=new ConnectionParameters();
            param.username="guest";
            param.password="guest";
            param.serverhost="192.168.30.1";
            param.serverport=8080;
            param.vhostpath="/";

            this.amqpConnection=new Connection(param);

            var myClient:SubscribeClientImpl=new SubscribeClientImpl(this.amqpConnection);
            myClient.serializer=this.serializer;
            myClient.exchange="fanOutExchange";
            myClient.exchangeType="fanout";

            myClient.subscribe("QUEUE4TU", onConsumeAmqpMessage);
        }

        private function onConsumeAmqpMessage(event:CorrelatedMessageEvent):void
        {
            var lMessage:String=event.result;
            trace(lMessage);
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant