Class ServiceBusReceivedMessageContext
java.lang.Object
com.azure.messaging.servicebus.ServiceBusReceivedMessageContext
The Service Bus processor message context that holds a received message and additional methods to settle the message.
-
Method Summary
Modifier and TypeMethodDescriptionvoidabandon()Abandons themessagein this context.voidabandon(AbandonOptions options) Abandons themessagein this context.voidcomplete()Completes themessagein this context.voidcomplete(CompleteOptions options) Completes themessagein this context.voidDead-letters themessagein this context.voiddeadLetter(DeadLetterOptions options) Dead-letters themessagein this context.voiddefer()Defers themessagein this context.voiddefer(DeferOptions options) Defers themessagein this context.Gets the Service Bus resource this instance ofServiceBusProcessorClientinteracts with.Gets the fully qualified Service Bus namespace that this instance ofServiceBusProcessorClientis associated with.Gets the message received from Service Bus.
-
Method Details
-
getMessage
Gets the message received from Service Bus.- Returns:
- The message received from Service Bus.
-
getEntityPath
Gets the Service Bus resource this instance ofServiceBusProcessorClientinteracts with.- Returns:
- The Service Bus resource this instance of
ServiceBusProcessorClientinteracts with.
-
getFullyQualifiedNamespace
Gets the fully qualified Service Bus namespace that this instance ofServiceBusProcessorClientis associated with. This is likely similar to{yournamespace}.servicebus.windows.net.- Returns:
- The fully qualified Service Bus namespace that this instance of
ServiceBusProcessorClientis associated with.
-
abandon
public void abandon()Abandons themessagein this context. -
abandon
Abandons themessagein this context.- Parameters:
options- Additional options for abandoning the message.
-
complete
public void complete()Completes themessagein this context. -
complete
Completes themessagein this context.- Parameters:
options- Additional options for completing the message.- Throws:
NullPointerException- ifoptionsare null.
-
defer
public void defer()Defers themessagein this context. -
defer
Defers themessagein this context.- Parameters:
options- Additional options for deferring the message.- Throws:
NullPointerException- ifoptionsare null.
-
deadLetter
public void deadLetter()Dead-letters themessagein this context. -
deadLetter
Dead-letters themessagein this context.- Parameters:
options- Additional options for dead-lettering the message.- Throws:
NullPointerException- ifoptionsare null.
-