Table of Contents

Class CampaignRequestOptions

Namespace
Azure.Iot.Operations.Services.LeaderElection
Assembly
Azure.Iot.Operations.Services.dll
public class CampaignRequestOptions
Inheritance
CampaignRequestOptions
Inherited Members

Properties

SessionId

The optional value to include in the lock's value. If not provided, the lock's value will equal the candidate's name. If it is provided, the lock's value will equal {candidate name}:{sessionId}

public string? SessionId { get; set; }

Property Value

string

Remarks

If this value is provided, then you'll need to provide the same value to SessionId or attempts to resign will fail.

By providing a unique sessionId, an application can use the same candidate name and/or the same MQTT client in different threads to campaign to be leader on the same lock without worrying about accidentally allowing two clients to both be leader at the same time.