# Message attributes from listeners and operations

*MuleSoft Developer Study Guide · Accessing and Modifying Mule Events · Last updated October 28, 2026 · https://www.certifyforce.com/study-guide/mulesoft-developer/accessing-and-modifying-mule-events/message-attributes-from-listeners-and-operations*

Where HTTP Listener, HTTP Request and File Read put their metadata in `attributes`, how to select URI parameters, repeated query parameters, hyphenated headers and the status code, and why a later operation or a Transform Message `set-attributes` replaces the attributes you saw earlier.

- Certification: Salesforce MuleSoft Developer
- Exam section: Accessing and Modifying Mule Events
- Study guide: https://www.certifyforce.com/study-guide/mulesoft-developer

**Official exam objective:**

> Apply correct processors/DataWeave expressions to access and modify Mule event attributes, and predict outcomes.

## What the exam expects

- Read HTTP Listener request metadata with `attributes.uriParams`, `attributes.queryParams`, `attributes.headers`, `attributes.method` and `attributes.requestPath`, and tell URI parameters from query parameters.
- Return every value of a repeated query parameter or header with the multi-value selector, and quote keys that are not valid identifiers such as `x-request-id`.
- Read HTTP Request response metadata (`attributes.statusCode`) and File metadata (`attributes.fileName`, `attributes.size`).
- Predict the attributes after a later operation or a Transform Message that sets attributes, and keep earlier attributes in a variable when they are needed later.
- Key terms: **attributes** (metadata of the message, read with `attributes`); **URI parameters** (values captured by `{param}` placeholders in the listener path); **query parameters** (values after `?`, a multimap); **multimap** (map that allows several values per key); **multi-value selector** (`.*key`, returns all matching values as an array).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Listener attributes | Method, request path, query, URI parameters and headers; the body is the payload | [Configure HTTP Listener Source](https://docs.mulesoft.com/http-connector/latest/http-listener-ref) |
| `{param}` placeholder | Captures the path segment on the URI parameters map | [Configure HTTP Listener Source](https://docs.mulesoft.com/http-connector/latest/http-listener-ref) |
| Multimaps | `queryParams` and `headers`; `.` returns the first value, `.*` all values | [Configure HTTP Listener Source](https://docs.mulesoft.com/http-connector/latest/http-listener-ref) |
| Raw query text | `attributes.queryString`, separate from `attributes.queryParams` | [Configure HTTP Listener Source](https://docs.mulesoft.com/http-connector/latest/http-listener-ref) |
| Non-identifier keys | Quote them: `attributes.headers.'content-type'` | [Mule Message Structure](https://docs.mulesoft.com/mule-runtime/latest/about-mule-message) |
| HTTP Request status | `attributes.statusCode`; quoting the console label `Status Code` returns `null` | [Mule Message Structure](https://docs.mulesoft.com/mule-runtime/latest/about-mule-message) |
| File Read attributes | `attributes.fileName`, `attributes.size`; no HTTP headers | [Mule Message Structure](https://docs.mulesoft.com/mule-runtime/latest/about-mule-message) |
| Keeping attributes | Set Variable with `#[attributes]` stores them for later components | [Set Variable Transformer](https://docs.mulesoft.com/mule-runtime/latest/variable-transformer-reference) |
| Setting attributes | Transform Message `<ee:set-attributes>` inside `<ee:message>` | [Transform Component XML Reference](https://docs.mulesoft.com/mule-runtime/latest/transform-dataweave-xml-reference) |
| `default` | Supplies a value when a field is absent or `null` | [Set Default Values with DataWeave](https://docs.mulesoft.com/dataweave/latest/dataweave-cookbook-defaults) |

## Check yourself

- When does `attributes.listenerPath` differ from `attributes.requestPath`?
- Why is the request body not where the HTTP Listener puts query parameters?
- How does `attributes.queryString` differ from `attributes.queryParams`?
- When does `default` supply a value in a DataWeave selector expression?

## Sources

- [Mule Message Structure](https://docs.mulesoft.com/mule-runtime/latest/about-mule-message)
- [Configure HTTP Listener Source](https://docs.mulesoft.com/http-connector/latest/http-listener-ref)
- [Predefined Variables](https://docs.mulesoft.com/dataweave/latest/dataweave-variables-context)
- [DataWeave Selectors](https://docs.mulesoft.com/dataweave/latest/dataweave-selectors)
- [Transform Component XML Reference](https://docs.mulesoft.com/mule-runtime/latest/transform-dataweave-xml-reference)
- [Add Another Output to the Transform Component](https://docs.mulesoft.com/mule-runtime/latest/transform-add-another-output-transform-studio-task)
- [Set Default Values with DataWeave](https://docs.mulesoft.com/dataweave/latest/dataweave-cookbook-defaults)
- [Set Variable Transformer](https://docs.mulesoft.com/mule-runtime/latest/variable-transformer-reference)
- [Variables in Mule Apps](https://docs.mulesoft.com/mule-runtime/latest/about-mule-variables)
- [Set Payload Transformer](https://docs.mulesoft.com/mule-runtime/latest/set-payload-transformer-reference)
- [Logger Component](https://docs.mulesoft.com/mule-runtime/latest/logger-component-reference)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 7 linked practice questions, and unlimited timed mock exams are included with the MuleSoft Developer pack (USD $19): https://www.certifyforce.com/practice-exams
