가 microservice 기반으로 합니다.NET 핵심 2.2. 내가 사용하 RawRabbit(버전 2.0.0-beta9)서비스 버스입니다. 다음과 같은 패키지가 설치되었으로 그것:
<PackageReference Include="RawRabbit" Version="2.0.0-beta9" />
<PackageReference Include="RawRabbit.DependencyInjection.ServiceCollection" Version="2.0.0-beta9" />
<PackageReference Include="RawRabbit.Operations.Publish" Version="2.0.0-beta9" />
<PackageReference Include="RawRabbit.Operations.Subscribe" Version="2.0.0-beta9" />
이것은 무엇을 내 컨트롤러처럼 보인:
private readonly IBusClient _busClient;
//...constructor that inits the _busClient
[HttpPost("")]
public async Task<IActionResult> Post([FromBody] CreateActivity model)
{
model.Id = Guid.NewGuid();
await _busClient.PublishAsync(model); //Exception thrown here
return Accepted($"Activities/{model.Name}");
}
은 문제가 발생합니다면 코드를 수행하려고 다음과 같다:
await _busClient.PublishAsync(model);
예외 나이:
는 방법을 찾을 수 없습니다:'Void Newtonsoft.Json.JsonSerializer.set_TypeNameAssemblyFormat(System.Runtime.Serialization.Formatters.FormatterAssemblyStyle)'.