> For the complete documentation index, see [llms.txt](https://docs.struct.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.struct.com/tutorials/guides/how-to-use-azure-service-bus/how-to-digest-azure-service-bus-request.md).

# How to digest Azure Service Bus request

This short tutorial is meant to assist you in digesting azure service bus requests

Once you have a queue set up in Azure Service Bus, events will be delivered there as messages.\
A Service Bus message consists of two main parts: metadata and body.

* **Metadata**: contains information about the message, such as "subject", "messageId", "eventKey", or "username". These values help identify the type of event, the origin, and when it was sent.
* **Body**: points to the actual business data, stored in blob storage. This data describes what changed, such as updated product attributes.

When your application receives a message, it should evaluate both the metadata and the body to process the event appropriately. After processing, the message should be marked as completed. If it cannot be processed, it may be retried or moved to the dead-letter queue.

***

## Example of a Service Bus message

The image below shows a typical message from the Azure Service Bus queue. The metadata includes values such as:

<figure><img src="https://2141378775-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuUonpFWM7AJ0xVVXV1tr%2Fuploads%2FWccxyo1av8DJOxPjSCyD%2Fimage.png?alt=media&amp;token=b27a2b98-b4cc-443d-b5d0-df93a7c03bc1" alt=""><figcaption></figcaption></figure>

You can find a Service Bus message by navigating to your Azure Service Bus namespace in the Azure Portal, selecting the queue subscription, and then opening the “Service Bus Explorer” to peek or receive messages.

***

## Example of the blob payload

The Service Bus message references a blob containing the actual event data.\
In this example, the payload shows that a product was updated:

```json
{
  "ProductChanges": [
    {
      "Id": 2383136,
      "UpdatedAttributes": ["Name"]
    }
  ],
  "TransactionUid": "a16163dd-7575-483e-9909-5706591fc03b"
}
```

This indicates that the product with the specific "Id" was updated, and the attribute that changed was "Name". The "TransactionUid" represents the identifier of the transaction in the changelog.

You can find the blob payload by going to the linked Azure Storage account, opening the container specified in the message metadata (for example by "blobName"), and locating the corresponding blob file that contains the event data.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.struct.com/tutorials/guides/how-to-use-azure-service-bus/how-to-digest-azure-service-bus-request.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
