pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
747 stars 144 forks source link

BusClient does not contain SubscribeAsync methods #318

Closed rbarna1 closed 6 years ago

rbarna1 commented 6 years ago

I think either my searching of this repo or the documentation in the repo itself is inconsistent with respect to the v1 vs v2 changes to the library.

In my ASPNetCore 2 app I'm trying to create a client from Configuration and add Polly. So, I'm using the v2 version of RawRabbitFactory. According to the docs I see, after I get one I should still be able to SubscibeAsync, but there are no methods on the new BusClient other than InvokeAsync.
Is the documentation out of whack or is my searching?

example: BusClient client = RawRabbitFactory.CreateSingleton(new RawRabbitOptions { ClientConfiguration = GetRawRabbitConfiguration(), Plugins = p => p.UsePolly(c => c .UsePolicy(rabbitPolicy)) }); services.AddSingleton(client);

client.SubscribeAsync((msg, context) => new ValueService().HandleValueRequest(msg, context));

rbarna1 commented 6 years ago

Ah, I see, seperate NuGet packages for Subscribe and ExecuteSequence. Still curious about the usage documentation, but I suppose that's still WIP.

pardahlman commented 6 years ago

You are right, the drafts for 2.0 can be found here, https://github.com/pardahlman/RawRabbit/tree/2.0/docs there is an Github issue for documentation #184