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

Automatically move message payload to an attachment if the size exceeds a configured threshold #768

Closed
mookid8000 opened this issue Jan 21, 2019 · 1 comment
Assignees
Labels

Comments

@mookid8000
Copy link
Member

If the size of the message payload exceeds the size limit for the configured transport, it would be neat if Rebus could automatically store the payload as an attachment, and then just send a message with an attachment ID.

This feature requires that Rebus can help with cleaning up old attachments, so this feature must be accompanied by #750 . This way, enabling this feature would require that some kind of clean-up strategy be defined, e.g. "clean up attachments that haven't been read for 72 hours", or something like that.

This would also solve the issue described here.

@mookid8000
Copy link
Member Author

Rebus 6 (which is currently available as version 6.0.0-b08) can do this:

Configure.With(_activator)
    .Transport(t => ...)
    .DataBus(d =>
    {
        d.SendBigMessagesAsAttachments(bodySizeThresholdBytes: 2*1024*1024);
        d.StoreInMemory(_dataStore);
    })
    .Start();

where SendBigMessagesAsAttachments is obviously what we're after here 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant