Show / Hide Table of Contents

Delegate ProducerTransformerAsync

A delegate that a client can register that will be called each time a Producer's send method is called to allow the client to Transform a sent message from one type to another, StreamMessage to TextMessage, ObjectMessage to TextMessage containing XML, etc. This allows a client to create a producer that will automatically transform a message to a type that some receiving client is capable of processing or adding additional information to a sent message such as additional message headers, etc. For messages that do not need to be processed the client should return null from this method, in this case the original message will be sent.

Namespace: CodersRealm.NmsAmqpClient
Assembly: CodersRealm.NmsAmqpClient.dll
Syntax
public delegate Task<IMessage?> ProducerTransformerAsync(IProducer producer, IMessage message)
Parameters
Type Name Description
IProducer producer A delegate that a client can register that will be called each time a Producer's send method is called to allow the client to Transform a sent message from one type to another, StreamMessage to TextMessage, ObjectMessage to TextMessage containing XML, etc. This allows a client to create a producer that will automatically transform a message to a type that some receiving client is capable of processing or adding additional information to a sent message such as additional message headers, etc. For messages that do not need to be processed the client should return null from this method, in this case the original message will be sent.
IMessage message A delegate that a client can register that will be called each time a Producer's send method is called to allow the client to Transform a sent message from one type to another, StreamMessage to TextMessage, ObjectMessage to TextMessage containing XML, etc. This allows a client to create a producer that will automatically transform a message to a type that some receiving client is capable of processing or adding additional information to a sent message such as additional message headers, etc. For messages that do not need to be processed the client should return null from this method, in this case the original message will be sent.
Returns
Type Description
Task<IMessage> A delegate that a client can register that will be called each time a Producer's send method is called to allow the client to Transform a sent message from one type to another, StreamMessage to TextMessage, ObjectMessage to TextMessage containing XML, etc. This allows a client to create a producer that will automatically transform a message to a type that some receiving client is capable of processing or adding additional information to a sent message such as additional message headers, etc. For messages that do not need to be processed the client should return null from this method, in this case the original message will be sent.
In this article
Back to top Generated by DocFX