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

Support for topic based routing #97

Closed
codedevote opened this issue Aug 3, 2016 · 2 comments
Closed

Support for topic based routing #97

codedevote opened this issue Aug 3, 2016 · 2 comments
Labels

Comments

@codedevote
Copy link

Does RawRabbit support topic exchanges and pattern matching? I surfed a little through the docs and code, but found nothing related. Is this on your roadmap for a future version?

@pardahlman
Copy link
Owner

It sure does. In fact, the default behaviour of RawRabbit is to create new exchanges as Topic Exchanges. This is just the default, users can configure just about anything. Here's a code snippet from the README

subscriber.SubscribeAsync<BasicMessage>(async (msg, i) =>
{
  //do stuff..
}, cfg => cfg
  .WithRoutingKey("*.topic.queue")
  .WithPrefetchCount(1)
  .WithNoAck()
  .WithQueue(queue =>
    queue
      .WithName("first.topic.queue")
      .WithArgument("x-dead-letter-exchange", "dead_letter_exchange"))
  .WithExchange(exchange =>
    exchange
      .WithType(ExchangeType.Topic)
      .WithAutoDelete()
      .WithName("raw_exchange"))
  );

For more information, check out the TopicExchangeTests.cs in this repo.

@codedevote
Copy link
Author

Awesome, thanks for pointing me in the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants