CompositionalIT / farmer

Repeatable Azure deployments with ARM templates - made easy!
https://compositionalit.github.io/farmer
MIT License
514 stars 156 forks source link

Add support for setting service bus max message size #1103

Closed MartinWa closed 4 weeks ago

MartinWa commented 2 months ago

The changes in this PR are as follows:

I have read the contributing guidelines and have completed the following:

If I haven't completed any of the tasks above, I include the reasons why here:

Below is a minimal example configuration that includes the new features, which can be used to deploy to Azure:

let myServiceBus = serviceBus {
    name "my-namespace"
    sku (Premium OneUnit)
    add_topics [
        topic {
            name "topicA"
            max_message_size 1024<Kb>
        }
    ]
}
isaacabraham commented 2 months ago

@MartinWa We'll schedule some time in to test this end-to-end and then merge in - looks good in principle. Thank you :-)

ninjarobot commented 1 month ago

I tested this out on codespaces and did a deployment. With the Premium SKU it's fine, but it has this obscure error on Standard:

SubCode=40000. Bad Request. To know more visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:aa804be5-4469-41dd-9547-216f926e1e16_G3, SystemTracker:my-namespace-1234.servicebus.windows.net:topicA, Timestamp:2024-06-08T15:01:59 (Code: MessagingGatewayBadRequest)

It does say in the documentation, but it's unfortunate the preflight validation doesn't give an error.

This property is only used in Premium today and default is 1024.

It would be helpful to raise an error on the Farmer side if trying to use this property on Basic or Standard. We don't do this for topics today either even though they wouldn't work on Basic, so I opened #1110 to address these scenarios for service bus validation.

ninjarobot commented 1 month ago

@isaacabraham I tested this today and it works as designed.

image