Database Reference
In-Depth Information
Message mutations
Message mutators allow you to change messages by plugging custom logic into a couple of
simple interfaces. For instance, you can encrypt all or part of a message. The encryption
message mutator is part of the NServiceBus library and can be used at any time. You can
intercept the incoming message, then mutate it before sending it as an outgoing message.
This is the process of changing messages; they leave a client and enter a server.
In this section, we will be using the MessageMutators solution with the following pro-
jects:
Client : The client will send messages to the server.
Server : The server will receive the mutated message.
Messages : This refers to the message format that is being passed between the cli-
ent and the server.
MessageMutators : This project will contain the mutation code to compress
and uncompress the messages in TransportMessageCompressionMutat-
or.cs and validate the message annotation in ValidateMessageMutat-
or.cs .
The client and server needs to be running. The client will prompt to send a good or bad
message. The good message is compressed so that it will pass the 4 MB MSMQ buffer
size:
The queue will be validated and compressed from the client before processing it on the
MSMQ:
Client → send message → Validate (Outgoing) →
TransportCompression (Outgoing) ---> To MSMQ
Search WWH ::




Custom Search