Configuration in this directory creates a queue with topic subscriptions on the PubSub+ appliance leveraging the Queues & Endpoints Terraform module.
msg_vpn_name
- Set todefault
in the example.endpoint_type
- Set toqueue
in the example.endpoint_name
- Set totestQS
in the example.permission
- Set toconsume
in the example to enable the receiver app to remove consumed messages from the queue.
You can specify a list of subscriptions to one or more topics for the queue. Topics may include wildcards. Additional configuration details are provided in the PubSub+ documentation.
queue_subscription_topics
: the list of topics as strings to subscribe to. Omitting this parameter or an empty list means no subscription.
Optional module input variables have the same name as the attributes of the underlying provider resource. If omitted, then the default for the related resource attribute will be configured on the broker. For a list of attributes and the corresponding defaults, see the documentation of "solacebroker_msg_vpn_queue".
The module provisioned_queue
output refers to the created queue.
The module provisioned_queue_subscriptions
output lists the created subscription resources for the queue.
This example will create the following resources:
solacebroker_msg_vpn_queue
- zero or more
solacebroker_msg_vpn_queue_subscription
resources, depending on the number of subscription topics provided
If you don't already have access to a broker, see the Developers page for options to get started.
The sample is available from the module GitHub repo:
git clone https://github.com/SolaceProducts/terraform-solacebrokerappliance-queue-endpoint.git
cd examples/queue-with-topic-subscriptions
Adjust the provider parameters in main.tf
according to your broker. The example configuration shows settings for a local broker running in Docker.
Tip: You can verify configuration changes on the broker, before and after, using the PubSub+ Broker Manager Web UI.
Execute from this folder:
terraform init
terraform plan
terraform apply
Run terraform destroy
to clean up the created resources when they are no longer needed.
For more information, see Configuring Queues section in the PubSub+ documentation.