PartitionContext Class

  • java.lang.Object
    • com.microsoft.azure.eventprocessorhost.PartitionContext

public class PartitionContext

Method Summary

Modifier and Type Method and Description
CompletableFuture<Void> checkpoint()

Writes the position of the last event in the current batch to the checkpoint store via the checkpoint manager.

It is important to check the result in order to detect failures.

If receiving started from a user-provided EventPosition and no events have been received yet, then this will fail. (This scenario is possible when invoke-after-receive-timeout has been set in EventProcessorOptions.)

CompletableFuture<Void> checkpoint(Checkpoint checkpoint)

Writes the position of the provided Checkpoint instance to the checkpoint store via the checkpoint manager.

It is important to check the result in order to detect failures.

CompletableFuture<Void> checkpoint(EventData event)

Writes the position of the provided EventData instance to the checkpoint store via the checkpoint manager.

It is important to check the result in order to detect failures.

String getConsumerGroupName()
String getEventHubPath()
String getOwner()
String getPartitionId()
ReceiverRuntimeInformation getRuntimeInformation()

Method Details

checkpoint

public CompletableFuture checkpoint()

Writes the position of the last event in the current batch to the checkpoint store via the checkpoint manager.

It is important to check the result in order to detect failures.

If receiving started from a user-provided EventPosition and no events have been received yet, then this will fail. (This scenario is possible when invoke-after-receive-timeout has been set in EventProcessorOptions.)

Returns:

CompletableFuture { ->} null when the checkpoint has been persisted successfully, completes exceptionally on error.

checkpoint

public CompletableFuture checkpoint(Checkpoint checkpoint)

Writes the position of the provided Checkpoint instance to the checkpoint store via the checkpoint manager.

It is important to check the result in order to detect failures.

Parameters:

checkpoint - a checkpoint

Returns:

CompletableFuture { ->} null when the checkpoint has been persisted successfully, completes exceptionally on error.

checkpoint

public CompletableFuture checkpoint(EventData event)

Writes the position of the provided EventData instance to the checkpoint store via the checkpoint manager.

It is important to check the result in order to detect failures.

Parameters:

event - A received EventData

Returns:

CompletableFuture { ->} null when the checkpoint has been persisted successfully, completes exceptionally on error.

getConsumerGroupName

public String getConsumerGroupName()

getEventHubPath

public String getEventHubPath()

getOwner

public String getOwner()

getPartitionId

public String getPartitionId()

getRuntimeInformation

public ReceiverRuntimeInformation getRuntimeInformation()

Applies to