Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BufferMessage ¶
func BufferMessage(ctx context.Context, m binding.Message, transformers ...binding.TransformerFactory) (binding.Message, error)
BufferMessage works the same as CopyMessage and it also bounds the original Message lifecycle to the newly created message: calling Finish() on the returned message calls m.Finish(). transformers can be nil and this function guarantees that they are invoked only once during the encoding process.
func CopyMessage ¶
func CopyMessage(ctx context.Context, m binding.Message, transformers ...binding.TransformerFactory) (binding.Message, error)
CopyMessage reads m once and creates an in-memory copy depending on the encoding of m. The returned copy is not dependent on any transport and can be visited many times. When the copy can be forgot, the copied message must be finished with Finish() message to release the memory. transformers can be nil and this function guarantees that they are invoked only once during the encoding process.
func WithAcksBeforeFinish ¶
WithAcksBeforeFinish returns a wrapper for m that calls m.Finish() only after the specified number of acks are received. Use it when you need to dispatch a Message using several Sender instances
Types ¶
This section is empty.