Closed WoozChucky closed 6 years ago
This seems to indicate that the subscription manager implementation from Shuttle.Esb.Sql.Subscription
has not been registered.
Perhaps check that the package is being referenced in your "Subscriber" application.
The package is included in the csproj
file so it is rather odd: https://github.com/Shuttle/Shuttle.Esb.Samples/blob/master/Shuttle.PublishSubscribe/Shuttle.PublishSubscribe.Subscriber/Shuttle.PublishSubscribe.Subscriber.csproj
Apologies, somehow I thought you were running the samples but I see that you are following the guides (by the looks of it).
The default behaviour is to use the NullSubscriptionManager
if no ISubscriptionManager
is registered before getting to the default registration portion in the ServiceBus.Register(registry);
method.
You could simply add the Shuttle.Esb.Sql.Subscription
package and it will use the bootstrapping mechanism to register the Shuttle.Esb.Sql.Subscription.SubscriptionManager
type.
It is also possible to register any other implementaion of the ISubscriptionManager
interface manually before calling the ServiceBus.Register(registry);
method.
Thanks for the information @eben-roux !
I managed to get it working with the Shuttle.Esb.Sql.Subscription
package.
Is there any other implementation of ISubscriptionManager
that uses for example InMemory subscription rather than SQL ? Or it is easy enough to implement it myself ?
The Shuttle.Esb.Sql.Subscription
package includes a Postgresql implementation also thanks to "Vincent Verschuren".
However, it certainly should be a simple process to add any other implementation. One of the "pros" of Shuttle.Esb
is that it can easily be extended.
As stated above you can register an implementation of ISubscriptionManager before calling the ServiceBus.Register(registry);
method (or use the bootstrapping).
It is a rather simple interface but please let me know if you need some guidance on any of the bits.
After having a look at that interface again I think I'll simplify it at some point. A couple of those methods can be extension methods since they are really there for convenience.
Thanks a lot for your help, managed to create a very basic in memory implementation!
Closing this now 👍
Hello, i'm trying to follow the GitHub sample for the Shuttle.PublishSubscribe example.
Everything works as intended except the Subscriber part.
I'm using RabbitMQ 3.7.7 and the message is published successfully from the client app to the server app. Also, the
MemberRegisteredEvent
is fired.I'm using Autofac for IoC.
The error occurs in the Subscriber app whenever I try to fetch the
ISubscriptionManager
to Subscribe to theMemberRegisteredEvent
.Here is my Host.cs code:
Am I missing something ?