It’s not clear from the docs
and https://docs.particular.net/samples/databus/custom-serializer/ the correct approach for using a custom data bus serializer with an existing container.
I’m using StructureMap via Microsoft DependencyInjection and have tried adding the registration
registry.For<IDataBusSerializer>().Use<JsonDataBusSerializer>(); to the registry from which I create a
StructureMapServiceProviderFactory to pass to
EndpointConfig.UseContainer. This doesn’t seem to be enough though - I also need to add
endpointConfig.RegisterComponents(x => x.ConfigureComponent<JsonDataBusSerializer>(DependencyLifecycle.SingleInstance)); but that feels like I’m mixing two DI approaches?
Have I got something wrong here? Thanks in advance.