silverback
silverback copied to clipboard
Outbox: A database per service is the recommended approach ?
I'm extending the poc with Outbox Pattern, now i'm trying to use a centralized database.
There are 2 applications, each application only knows their own messages.
When the App1 reads the Outbox table it tries to publish a message in a unknow namespace for the App1, and the following exception is thown:
[17:21:17 ERR] Error occurred processing the outbox.
System.IO.FileNotFoundException: Could not load file or assembly 'Super.App2.Api, Culture=neutral, PublicKeyToken=null'. O sistema não pode encontrar o arquivo especificado.
File name: 'Super.App2.Api, Culture=neutral, PublicKeyToken=null'
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, StackCrawlMarkHandle stackMark, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack type, ObjectHandleOnStack keepalive)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext)
at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName, Boolean throwOnError)
at Silverback.Util.TypesCache.ResolveType(String typeName, Boolean throwOnError)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Silverback.Util.TypesCache.GetType(String typeName, Boolean throwOnError)
at Silverback.Messaging.Outbound.TransactionalOutbox.Repositories.DbOutboxReader.<>c.<ReadAsync>b__2_1(OutboxMessage message)
at System.Linq.Enumerable.SelectListIterator`2.ToList()
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Silverback.Messaging.Outbound.TransactionalOutbox.Repositories.DbOutboxReader.ReadAsync(Int32 count)
at Silverback.Messaging.Outbound.TransactionalOutbox.OutboxWorker.ProcessQueueAsync(IServiceProvider serviceProvider, CancellationToken stoppingToken)
at Silverback.Messaging.Outbound.TransactionalOutbox.OutboxWorker.ProcessQueueAsync(CancellationToken stoppingToken)
Is that the expected bahaviour ?