Package com.azure.messaging.servicebus
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 TypeMethodDescriptionvoid
abandon()
Abandons themessage
in this context.void
abandon
(AbandonOptions options) Abandons themessage
in this context.void
complete()
Completes themessage
in this context.void
complete
(CompleteOptions options) Completes themessage
in this context.void
Dead-letters themessage
in this context.void
deadLetter
(DeadLetterOptions options) Dead-letters themessage
in this context.void
defer()
Defers themessage
in this context.void
defer
(DeferOptions options) Defers themessage
in this context.Gets the message received from Service Bus.
-
Method Details
-
getMessage
Gets the message received from Service Bus.- Returns:
- The message received from Service Bus.
-
abandon
public void abandon()Abandons themessage
in this context. -
abandon
Abandons themessage
in this context.- Parameters:
options
- Additional options for abandoning the message.
-
complete
public void complete()Completes themessage
in this context. -
complete
Completes themessage
in this context.- Parameters:
options
- Additional options for completing the message.- Throws:
NullPointerException
- ifoptions
are null.
-
defer
public void defer()Defers themessage
in this context. -
defer
Defers themessage
in this context.- Parameters:
options
- Additional options for deferring the message.- Throws:
NullPointerException
- ifoptions
are null.
-
deadLetter
public void deadLetter()Dead-letters themessage
in this context. -
deadLetter
Dead-letters themessage
in this context.- Parameters:
options
- Additional options for dead-lettering the message.- Throws:
NullPointerException
- ifoptions
are null.
-