简体   繁体   中英

Orleans Extension not installed

I'm starting to dive into the Orleans Streams and I'm running into an issue using ImplicitStreamSubscription. I'm building upon the QuickStart example by adding a new project that implements both the interfaces and the grains. Here is the all of the code I have so far in my grains.

[ImplicitStreamSubscription("RANDOMDATA")]
public class VSMDiscovery : Grain, IVSMDiscovery
{
    public override Task OnActivateAsync()
    {
        Console.WriteLine("Started" + this.GetPrimaryKey());

        return base.OnActivateAsync();
    }
}

public interface IVSMDiscovery : IGrainWithIntegerKey
{
}

In the DevTest main, I simply send an event using

 var guid = Guid.NewGuid();

 //Get one of the providers which we defined in config
 var streamProvider = Orleans.GrainClient.GetStreamProvider("SMSProvider");

 //Get the reference to a stream
 var stream = streamProvider.GetStream<int>(guid, "RANDOMDATA");

 stream.OnNextAsync(1);

Everything seems to execute fine, a new grain is instantiated and OnActivateAsync is called which writes the message to the console, however I get this error.

VSM Started206d105b-d21b-496c-997a-9dac3cf370b3 Extension not installed on grain Draco.VSMConnection.VSMDiscovery attempting to invoke type Orleans.Streams.OrleansCodeGenStreamConsumerExtensionMethodInvoker from invokable Orleans.Runtime.ActivationData Exception = Orleans.Runtime.GrainExtensionNotInstalledException: Extension not installed on grain Draco.VSMConnection.VSMDiscovery attempting to invoke type Orleans.Streams.OrleansCodeGenStreamConsumerExtensionMethodInvoker from invokable Orleans.Runtime.ActivationData

[2016-03-09 05:53:41.007 GMT 14 WARNING 103405 InsideRuntimeClient 127.0.0.1:11111] Extension not installed on grain Draco.VSMConnection.VSMDiscovery attempting to invoke type Orleans.Streams.OrleansCodeGenStreamConsumerExtensionMethodInvoker from invokable Orleans.Runtime.ActivationData for message NewPlacement Request S127.0.0.1:11111:195198808*cli/5853f180@9c59fabf->S127.0.0.1:11111:195198808*grn/EB2C0203/ac9d7a99@0e33939b #5: global::Orleans.Streams.IStreamConsumerExtension:DeliverItem()

As I mentioned, everything appears to be running ok, but having this error is very concerning. Any help would be greatly appreciated.

您需要确保在配置文件中为客户端和筒仓正确指定了“SMSProvider”流提供程序,如下所示: https : //github.com/dotnet/orleans/blob/master/test/Tester/OrleansConfigurationForStreamingUnitTests .xml#L9

For me, this was caused by having a grain which had an implicit subscription attribute, but which FORGOT to subscribe to the stream in the OnActiveAsync method (which is required and is outlined in the quick start mentioned above).... not clear from the error message at all. Hope this saves someone else some pain.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM