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

exchange type "direct" not work correctly #6

Open
kolprogman opened this issue Oct 18, 2011 · 0 comments
Open

exchange type "direct" not work correctly #6

kolprogman opened this issue Oct 18, 2011 · 0 comments

Comments

@kolprogman
Copy link
Contributor

Troulble description:
i need route messages via "routing key" and exchange type "direct". Messages sent to common queue . I use class extends RabbitMQFirehose for publishing messages. for route opportunity i override method String routingKey(T t);
also, i extends class RabbitMQConsumer and override method String routingKey(T t); after run my project, messages sent to common queue. Message delivery to any consumers and processed him, "routing key" ignored.

important:
i use single common queue.
all messages sent to common queue.
consumer take message by "routig key".

May be error in "Channel createChannel(String queue, String routingKey)" method in RabbitMQPlugin.java.

channel.exchangeDeclare(queue, plugin.getExchangeType(), true);

channel.queueDeclare(queue, plugin.isDurable(), false, false, null);
// Why queue and exchange have the same name? in my case, they must be different.
channel.queueBind(queue, queue, routingKey);

how i make work of exchange(type direct) is correct?

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