I would like to specify for php developers how to Send a message (Command in the MassTransit documentation) that will be consumed by a MassTransit C# consumer.
What are the minimum requirements to ensure the message is consumed?
You need to form the message as a correct JSON document, like this:
{
"destinationAddress": "rabbitmq://localhost/input_queue",
"headers": {},
"message": {
"value": "Some Value",
"customerId": 27
},
"messageType": [
"urn:message:MassTransit.Tests:ValueMessage"
]
}
These fields form the message document, not used fields do not serialise:
string MessageId
string CorrelationId
string ConversationId
string InitiatorId
string RequestId
string SourceAddress
string DestinationAddress
string ResponseAddress
string FaultAddress
DateTime? ExpirationTime
IDictionary<string, object> Headers
object Message
string[] MessageType
HostInfo Host
There is a full article about interoperability in the documentation.