I've recently upgradeed one of our solutions from MassTransit 2 to 3 and since the upgrade, we've noticed that MT 3 is appending an extra host information detail appended to the message payload (detail omitted):
{
"messageId": "guid",
"conversationId": "guid",
"sourceAddress": "rabbitmq://rabbitserver/source",
"destinationAddress": "rabbitmq://rabbitserver/destination",
"messageType": [
...
],
"message": {
...
},
"headers": {},
"host": {
"machineName": "...",
"processName": "...",
"processId": 1234,
"assembly": "MassTransit",
"assemblyVersion": "3.1.2.383",
"frameworkVersion": "...",
"massTransitVersion": "3.1.2.383",
"operatingSystemVersion": "..."
}
}
We'd like to suppress the host information from being added or to rename it as it's causing conflicts in our system.
I've looked at creating middleware as mentioned here: Adding values to header in MassTransit.RabbitMq but can't seem to get access to the data to removed it and after a quick look in the code from github, I can't see any option to not send the host info. Is there something I'm missing, or is there a way I can remove/rename this data when the message is published?