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

[QUERY] What is the actual type of Azure.Storage.Queues.Models.QueueMessage.MessageId? #22673

Closed
IanKemp opened this issue Jul 15, 2021 · 2 comments
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@IanKemp
Copy link

IanKemp commented Jul 15, 2021

Query/Question
According to MSDN, the type of QueueMessage.MessageId is string. However in our testing, we have seen that it is actually always a Guid that's been ToString()'ed.

Other MSDN docs, e.g. this one, explicitly state that this value is a GUID even though typed as a string. (I'm aware that linked doc is referring to a very old version, I'm just giving an example of a mismatch).

Can I rely on this value always being a GUID in actuality? The reason I ask is that I have a requirement to serialize specific queue messages into a SQL database (please don't ask why), and obviously if the MessageId is actually a GUID I can just use it directly as the primary key on the table to look up a particular message. Conversely, if it's actually a string, I need a standard integer PK with a separate indexed nvarchar(max) column holding the MessageId.

Finally, if MessageId is a GUID, why is it still typed as string in the SDK POCOs? Simply for backwards-compatibility reasons?

Environment:

  • Name and version of the Library package used: Azure.Storage.Queues 12.6.1.0
@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 15, 2021
@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files) labels Jul 15, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jul 15, 2021
@ghost
Copy link

ghost commented Jul 15, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

Issue Details

Query/Question
According to MSDN, the type of QueueMessage.MessageId is string. However in our testing, we have seen that it is actually always a Guid that's been ToString()'ed.

Other MSDN docs, e.g. this one, explicitly state that this value is a GUID even though typed as a string. (I'm aware that linked doc is referring to a very old version, I'm just giving an example of a mismatch).

Can I rely on this value always being a GUID in actuality? The reason I ask is that I have a requirement to serialize specific queue messages into a SQL database (please don't ask why), and obviously if the MessageId is actually a GUID I can just use it directly as the primary key on the table to look up a particular message. Conversely, if it's actually a string, I need a standard integer PK with a separate indexed nvarchar(max) column holding the MessageId.

Finally, if MessageId is a GUID, why is it still typed as string in the SDK POCOs? Simply for backwards-compatibility reasons?

Environment:

  • Name and version of the Library package used: Azure.Storage.Queues 12.6.1.0
Author: IanKemp
Assignees: -
Labels:

Client, Service Attention, Storage, customer-reported, needs-team-attention, needs-triage, question

Milestone: -

@kasobol-msft
Copy link
Contributor

kasobol-msft commented Jul 15, 2021

@IanKemp The REST API doc states that message id is a GUID. Same doc states that message id is opaque to the client, i.e. client should not attempt to interpret that value, hence string in SDK models (which also means less parsing/serializing).

For your purpose I think it's safe to assume that message id is a GUID.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

4 participants