Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add response headers to PeekLockResponse. #1282

Merged
merged 5 commits into from
Jun 27, 2023
Merged

Add response headers to PeekLockResponse. #1282

merged 5 commits into from
Jun 27, 2023

Conversation

jltorresm
Copy link
Contributor

Service Bus Queue messages can have custom properties set (additionally to the standard properties set by the broker). Those are mapped to headers in the rest API.

In order to get those values we need to include the Headers as part of the response.

@demoray
Copy link
Contributor

demoray commented May 18, 2023

The documentation you linked indicates the properties are in a single header.

When sending a message, you can specify the following message properties. If a single message is sent or received, then these properties are contained in the BrokerProperties HTTP header in a JSON-encoded format

Instead of returning all of the headers, what are your thoughts on returning a decoded value of BrokerProperties?

@jltorresm
Copy link
Contributor Author

I don't oppose it in principle, but that wouldn't cover the custom properties. In the final section of the docs, it mentions:

In addition to these properties, you can specify custom properties. If a single message is sent or received, each custom property is placed in its own HTTP header

Since these can have arbitrary names, I don't see how we could contain them struct. I tested custom properties on a dev queue and they are indeed set in their own headers.

@jltorresm
Copy link
Contributor Author

Let me know your thoughts, I'm happy to rework this towards a better solution.

@jltorresm
Copy link
Contributor Author

@microsoft-github-policy-service agree

@demoray demoray merged commit 6a95acf into Azure:main Jun 27, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants