Skip to content

Conversation

@DavidBoike
Copy link
Member

No description provided.

var documentId = MessageBodyIdGenerator.MakeDocumentId(messageId);
using var session = documentStore.OpenAsyncSession();

// BodyId could be a MessageID or a UniqueID, but if a UniqueID then it will be a DeterministicGuid of MessageID and endpoint name and be Guid-parseable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can it be a message ID or unique ID?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because in my redesign, we're always storing it using the unique ID, and the message metadata will say "look at messages/{uniqueId}/body for the body" so in theory, it should always be the unique ID. But previous versions stored the body only by message ID and while in theory, Pulse and Insight should pay attention to the message metadata that points to the uniqueID-based URL, it's impossible for me to say that assumption hasn't leaked into one of those apps. So just following what the API looks like, it's entirely reasonable some client somewhere could try to access by message ID.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we test SI + SP and they use the BodyUrl we could simplify this and only use Unique ID?

@DavidBoike DavidBoike self-assigned this Oct 3, 2023
@DavidBoike DavidBoike merged commit 1439774 into master Oct 4, 2023
@DavidBoike DavidBoike deleted the body-storage branch October 4, 2023 17:00
@DavidBoike DavidBoike added this to the 5.0.0 milestone Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants