I have updated these libraries for messaging in a project to the latest versions:
I was very confused when found that some of very convenient old methods are missing in this versions.
I have the following rebus configuration api:
Configure.With(new WindsorContainerAdapter(container))
.Logging(l => l.Log4Net())
.Transport(t => t.UseRabbitMqAndGetInputQueueNameFromAppConfig(connectionString)
.ManageSubscriptions().SetPrefetchCount(5))
.MessageOwnership(d => d.FromRebusConfigurationSection())
.Serialization(s => s.Use(new MySerializer()))
.CreateBus()
.Start();
These methods are absent in the new version:
The Rebus documentation though still has references on old methods and scenarios in many places.
What has been done with old convenient methods? Has anybody had the same problem and could give me a hint what apis to use in the current version (0.99.67) for existing way of configuring a client.
Rebus versions up to and including 0.84.0 are "Rebus 1" - Rebus received a pretty big update (a rewrite of the core, followed by porting most libs forwards) in version 0.90.0 - "Rebus 2"
So your best bet is probably to Update-Package Rebus -Version 0.84.0
(and do the same to the RabbitMQ, Windsor, and Log4net integration packages)
Rebus 2 is not compatible with Rebus 1, so if you decide to update to 2, you should be aware of that.
Moreover (as you have discovered) it has seen a couple of API changes, where the most significant change is that most methods on IBus
are now async
and thus requires that you e.g await bus.Send(...)
(or bus.Send(...).Wait()
if you are not in an async
method)