Skip to content

Commit

Permalink
Doc: correct typo
Browse files Browse the repository at this point in the history
  • Loading branch information
minhtaile2712 authored Oct 4, 2024
1 parent e121a5b commit edd8432
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/docs/guides/middlewares/middlewares.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ public class JsonDeserializeMiddleware : IMessageMiddleware
if(!(context.Message is byte[] rawMessage))
throw new InvalidOperationException();

var type = Type.GetType(context.Headers.GetString("Message-Type"));
var messageType = Type.GetType(context.Headers.GetString("Message-Type"));

var jsonMessage = Encoding.UTF8.GetString(rawMessage);

context.TransformMessage(JsonConvert.Deserialize(jsonMessage, MessageType));
context.TransformMessage(JsonConvert.Deserialize(jsonMessage, messageType));

return next(context);
}
Expand Down

0 comments on commit edd8432

Please sign in to comment.