arcus-azure / arcus.messaging

Messaging with Microsoft Azure in a breeze.
https://messaging.arcus-azure.net
MIT License
20 stars 11 forks source link

Provide limit on the `Message.Size` that the Azure Message Pump can process #114

Open stijnmoreels opened 3 years ago

stijnmoreels commented 3 years ago

Is your feature request related to a problem? Please describe. Maybe we should provide the possibility to provide a maximum size limit in the Azure Service Bus message pump options that can be checked before we go through the message handling logic and maybe overload parsing/deserialization/... It can be an safety check on malicious attempts. It can then maybe be processed by a fallback message handler instead?

Describe the solution you'd like A size limit (maybe represent metric units (KB, MB, ...) with an enumeration) in the Azure Service Bus message pump options.

Describe alternatives you've considered Each message pump implementation and/or message handler should handle and be careful of sizes before parsing.

Additional context When implementing the CloudEvents background job, we can use this feature to set an appropriate size limit there. See https://github.com/cloudevents/spec/blob/master/spec.md#size-limits.

tomkerkhove commented 3 years ago

I haven't heard about the need for that but we can definitely keep it open to see if there is demand for it.

It has value but is very niche. I presume this would be an optional flag?

stijnmoreels commented 3 years ago

I haven't heard about the need for that but we can definitely keep it open to see if there is demand for it.

OK!

It has value but is very niche. I presume this would be an optional flag?

Yeah, this could be an optional long or something that we can set on the options of the pump.