Merge pull request #1 from michaelgregson/michaelgregson-patch-1

Serialize properties in derived classes
This commit is contained in:
Michael Gregson 2021-07-30 17:26:35 +01:00 committed by GitHub
commit 1d810ce578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@
public void Publish(IntegrationEvent @event) public void Publish(IntegrationEvent @event)
{ {
var eventName = @event.GetType().Name.Replace(INTEGRATION_EVENT_SUFFIX, ""); var eventName = @event.GetType().Name.Replace(INTEGRATION_EVENT_SUFFIX, "");
var jsonMessage = JsonSerializer.Serialize(@event); var jsonMessage = JsonSerializer.Serialize(@event, @event.GetType());
var body = Encoding.UTF8.GetBytes(jsonMessage); var body = Encoding.UTF8.GetBytes(jsonMessage);
var message = new Message var message = new Message