As a python subscriber to an external broker, we are only limited to create Durable Exclusive queue via SMF Api.
Since there’s an existing method prior to starting the receiver, with_missing_resources_creation_strategy(), by default its endpoint created on a permission for that queue is Delete. However, it is required for us to use None permission.
This is the sample of override queue permission prior to creation in python
Hey @ManuManu! You can definitely do this leveraging queue templates and Queue Name Filter, and basically pass a queue name that matches the filter you defined. You can create a queue template in 3 ways:
PubSub+ Broker management console
CLI
SEMP
From the web UI mgmt console, you can do so by navigating to the queues tab and under templates create a template
Hi @Tamimi, The 3 options would not work for us as our external client only allow us to use SMF port 55443. We will try to work with the external client if it’s possible for them to configure a queue template on behalf of us.
Although a bit hacky but this one works using SMF when we tested it. What we are just missing is the property for Message Expiry Maximum TTL.
The code below:
sets the permission for the queue to None. Only us can have control of the queue
Is it possible to include it in the python roadmap the ability to include extra properties using with_messing_resources_creation_strategy() ?
I think it would be great for subscribers have ability to add extra properties, with limitations, on creating a new queue especially when a subscriber is only allowed SMF.
@ManuManu the missing resource strategy is a design principle of our new batch of APIs with Python being the start. A new Java API is due any minute now, and we have also added durable endpoint creation in JS/Node due out end of Oct.
As the missing resource design is not an admin-centric “provisioning” API but more of a convenience to devs who only have access to SMF APIs not SEMP or Manager GUI, we have still allowed admins to control, to an extent, what the limits/parameters are included in the queues that the APIs can create. This is why anything non-default is controlled by templates.
The idea is that when a broker admin sets up client usernames/profiles/ACLs for an application/set of applications (which is only available to admins), when they grant the ability to have the Apps create durable endpoints (and typically we see this in dev/test but rarely in production), they would also create queue template(s) that the Apps use when creating their durable endpoints. Creating a durable endpoint like a queue takes up physical resources on a broker and the admin will want to balance the convenience of allowing their App devs to create them on the fly vs. managing the resources across the message VPN for everyone.
So we really see the pattern of creating queue templates as part of the client App onboarding and are unlikely to expand the APIs to do more of this.