4

I'm trying to get a grip on ServiceBus architecture and I am using RawRabbit 1.10.4. For this I am following an online course where RawRabbit is used. In the Registration of Command Handlers, the following Extension Method is created, where the Methoc ctx.UseConsumerConfiguration is called.

The Extension method should be in RawRabbit.Pipe namespace, which is not available. What is the nuget package I need to install, to get the extension methods, or has this extension method / namespace been removed in Version 1.10.4?

    public static class Extensions
{
    public static Task WithCommandHandlerAsync<TCommand>(this IBusClient bus,
        ICommandHandler<TCommand> handler)
        where TCommand : ICommand
    => bus.SubscribeAsync<TCommand>(msg => handler.HandleAsync(msg),
        ctx => ctx.UseConsumerConfiguration(cfg => cfg.FromDelaredQueue(q => q.WithName("XXX"))));
}
Franz Kiermaier
  • 387
  • 3
  • 19

3 Answers3

5

I think you need to install RawRabbit 2.0, and the latest version in Nuget Manager Package is only 1.10.4 something. However you can use Package Manager Console to install version 2 with following syntax

Install-Package RawRabbit -Version 2.0.0-beta9

Hope this helps

Justin Pham
  • 183
  • 2
  • 7
0

Actually you have to install the nuget package RawRabbit.Compatibility.Legacy then reference into your class the namespace RawRabbit.Compatibility.Legacy or install the package RawRabbit.Operations.Subscribe if you don't want to work with legacy code

Use UseSubscribeConfiguration instead of UseConsumerConfiguration

Ghini Antonio
  • 2,992
  • 2
  • 25
  • 48
0

On the "Add Packages" dialog there is a "Show pre-release packages" checkbox you can tick, so the "Version" combobox will show the beta and rc releases as well.

Add Packages dialog

Adail Retamal
  • 428
  • 5
  • 10