Table of Contents

Class ActivityProducerBehavior

Namespace
Silverback.Messaging.Diagnostics
Assembly
Silverback.Integration.dll

Starts an Activity and adds the tracing information to the message headers.

public class ActivityProducerBehavior : IProducerBehavior, IBrokerBehavior, ISorted
Inheritance
ActivityProducerBehavior
Implements
Inherited Members

Remarks

The activity is enriched by the producer, when the message has been produced and right before logging it.

Constructors

ActivityProducerBehavior()

public ActivityProducerBehavior()

Properties

SortIndex

Gets the sort index.

public int SortIndex { get; }

Property Value

int

Methods

HandleAsync(ProducerPipelineContext, ProducerBehaviorHandler, CancellationToken)

Process, handles or transforms the message being produced.

public ValueTask HandleAsync(ProducerPipelineContext context, ProducerBehaviorHandler next, CancellationToken cancellationToken)

Parameters

context ProducerPipelineContext

The context that is passed along the behaviors pipeline.

next ProducerBehaviorHandler

The next behavior in the pipeline.

cancellationToken CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

ValueTask

A ValueTask representing the asynchronous operation.