buffering

package
v2.16.2 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 8 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package buffering provides APIs for buffered messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufferMessage

func BufferMessage(ctx context.Context, m binding.Message, transformers ...binding.Transformer) (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.Transformer) (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

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 dispatch a Message using several 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