ServiceBusReceivedMessageContext Class

  • java.lang.Object
    • com.azure.messaging.servicebus.ServiceBusReceivedMessageContext

public final class ServiceBusReceivedMessageContext

The Service Bus processor message context that holds a received message and additional methods to settle the message.

Method Summary

Modifier and Type Method and Description
void abandon()

Abandons the getMessage() in this context.

void abandon(AbandonOptions options)

Abandons the getMessage() in this context.

void complete()

Completes the getMessage() in this context.

void complete(CompleteOptions options)

Completes the getMessage() in this context.

void deadLetter()

Dead-letters the getMessage() in this context.

void deadLetter(DeadLetterOptions options)

Dead-letters the getMessage() in this context.

void defer()

Defers the getMessage() in this context.

void defer(DeferOptions options)

Defers the getMessage() in this context.

String getEntityPath()

Gets the Service Bus resource this instance of ServiceBusProcessorClient interacts with.

String getFullyQualifiedNamespace()

Gets the fully qualified Service Bus namespace that this instance of ServiceBusProcessorClient is associated with.

ServiceBusReceivedMessage getMessage()

Gets the message received from Service Bus.

Methods inherited from java.lang.Object

Method Details

abandon

public void abandon()

Abandons the getMessage() in this context.

abandon

public void abandon(AbandonOptions options)

Abandons the getMessage() in this context.

Parameters:

options - Additional options for abandoning the message.

complete

public void complete()

Completes the getMessage() in this context.

complete

public void complete(CompleteOptions options)

Completes the getMessage() in this context.

Parameters:

options - Additional options for completing the message.

deadLetter

public void deadLetter()

Dead-letters the getMessage() in this context.

deadLetter

public void deadLetter(DeadLetterOptions options)

Dead-letters the getMessage() in this context.

Parameters:

options - Additional options for dead-lettering the message.

defer

public void defer()

Defers the getMessage() in this context.

defer

public void defer(DeferOptions options)

Defers the getMessage() in this context.

Parameters:

options - Additional options for deferring the message.

getEntityPath

public String getEntityPath()

Gets the Service Bus resource this instance of ServiceBusProcessorClient interacts with.

Returns:

The Service Bus resource this instance of ServiceBusProcessorClient interacts with.

getFullyQualifiedNamespace

public String getFullyQualifiedNamespace()

Gets the fully qualified Service Bus namespace that this instance of ServiceBusProcessorClient is associated with. This is likely similar to {yournamespace}.servicebus.windows.net.

Returns:

The fully qualified Service Bus namespace that this instance of ServiceBusProcessorClient is associated with.

getMessage

public ServiceBusReceivedMessage getMessage()

Gets the message received from Service Bus.

Returns:

The message received from Service Bus.

Applies to