Loading multiple assemblies for static type loading #1853
Replies: 2 comments
-
|
@mrajkovicpta I'm dubious that this is necessary. As long as you have the handler discovery set up the way you need it to to find all of your handlers -- and you can spot verify this through I'm converting this to a discussion for now. There has to be something off one way or another about your configuration. Feel free to ask more questions here or in Discord. |
Beta Was this translation helpful? Give feedback.
-
|
@jeremydmiller Have a good day |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue/Wanted Behavior
We are using Wolverine as our RabbitMQ bus but when using
WolverineOptions.CodeGeneration.TypeLoadMode = TypeLoadMode.Dynamicwe are sometimes getting timeout issues due to cold starts. We tried shifting toTypeLoadMode.Staticbut due to the mode seemingly only looking for types in the application assembly it is unable to find the message type which is located in a separate assembly due to our project structure.The
WolverineOptions.CodeGeneration.ReferenceAssemblymethod sounds like it would do this but in the documentation here it says that it will only look in the main assembly.Proposed Solution
My proposed solution is to simply have the static generation also use assemblies referenced in
ReferenceAssembly. This could also lead to confusion in the future as theWolverineOptions.Discoveryalso has a method for adding assemblies to search through but that one is for Handler discovery, however this is only a minor issue.Alternatives
For our particular use case we have currently decided to increase the message timeout and it works.
Additional Info
The message type is simply in a separate assembly (c# project) in order for both the sender and the receiver to have access to the message type
Stack trace when
TypeModeLoad.Staticis enabled, this happens regardless of how I configure referenced/discovery/executing assembliesBeta Was this translation helpful? Give feedback.
All reactions