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

Using fanout exchanges #2

Open
ducky427 opened this issue Nov 27, 2009 · 0 comments
Open

Using fanout exchanges #2

ducky427 opened this issue Nov 27, 2009 · 0 comments

Comments

@ducky427
Copy link

Hi,
I am trying to use SubscribeClientImpl with a fanout exchange without much success. Here is some of my code:

    var connection:Connection = new Connection(buildConnectionParams());
    var serializer:JSONSerializer = new JSONSerializer()

    var subClient:SubscribeClientImpl = new SubscribeClientImpl(connection);
    subClient.serializer = serializer;
    subClient.exchange = "multicast";
    subClient.exchangeType = "fanout";
    subClient.subscribe("routing_key", onConsume);

Now the subClient.subscribe method takes the routing key and the method to be called as inputs. The routing key is immaterial for exchanges of type fanout. More here.

Digging deeper into the code, I found that onDeliver method of SubscribeClientImpl is being called. I can see that there is a trace method in that method on line 123 which is being printed in debug mode. But this line (line 126) is not working properly:

    var topic:String = matchTopic(properties.correlationid || method.routingkey);

Any help would be appreciated. I apologize if I overlooked anything. I am pretty new to AMQP.

cheers,
ducky

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