buffering

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

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 does the same than CopyMessage and it also bounds the original Message lifecycle to the newly created message: calling Finish() on the returned message calls m.Finish()

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 read many times. When the copy can be forgot, the copied message must be finished with Finish() message to release the memory

func WithAcksBeforeFinish

func WithAcksBeforeFinish(m binding.Message, requiredAcks int) binding.Message

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 route a Message to more Sender instances

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL