2014-10-08 13 views
0

我使用NServiceBus託管在我自己的進程中,RavenDB也託管在使用RavenDB.Embedded的相同進程中。NServiceBus 5使用EmbeddableDocumentStore的RavenDBPersistence SetDefaultDocumentStore

當我使用NServiceBus 4.6.5時,此組合功能沒有任何問題,但我升級到NServiceBus 5.0.0並更新了配置以使用新的配置api。

所有內容都可以構建,我可以將消息發送到接收到的端點並構造一個saga實例。

然而,NServiceBus然後引發與所述消息的異常:

否佐賀持留配置。

Configure.With() 
     .DefaultBuilder() 
     .RavenPersistenceWithStore(DocumentStore) 

隨着NServiceBus 5.0.0我曾嘗試以下操作:如果你想使用nservicebus傳奇支持

我用下面的配置成功地與NServiceBus 4.6.5請配置一個傳奇的持留配置沒有任何的運氣:

1.

configuration.UsePersistence<RavenDBPersistence>() 
      .SetDefaultDocumentStore(DocumentStore); 

2.

configuration.UsePersistence<RavenDBPersistence>() 
      .SetDefaultDocumentStore(DocumentStore) 
      .UseDocumentStoreForSagas(DocumentStore); 

3.

configuration.UsePersistence<RavenDBPersistence>() 
      .SetDefaultDocumentStore(DocumentStore) 
      .UseDocumentStoreForSagas(DocumentStore) 
      .UseDocumentStoreForSubscriptions(DocumentStore) 
      .UseDocumentStoreForTimeouts(DocumentStore); 

和所有三個有和沒有:

configuration.EnableFeature<RavenDbSagaStorage>(); 

如果我使用InMemoryPersistence然後一切都很正常。

有沒有其他人與RavenDB.Embedded與NServiceBus 5.0.0結合體驗這個問題?

回答

1

我得到這個重新工作,我缺少的是:

configuration.AssembliesToScan 
      (typeof(SomeMessage).Assembly, 
      typeof(SomeHandler).Assembly, 
      typeof(RabbitMQTransport).Assembly, 
      typeof(RavenDBPersistence).Assembly); 

應該在我已經設定的配置掃描我的消息和處理程序組件與RabbitMQTransport的裝配沿着這個問題已經提到。

我並不需要事先掃描以下組件,但確實有現在顯然:

typeof(RavenDBPersistence).Assembly 
相關問題