Configuration in this directory creates a topic endpoint that is also exposed as a JNDI administered object on the PubSub+ event broker leveraging the Queues & Endpoints Terraform module.
Note that exposing topics as JNDI objects requires that you enable JNDI at the Message VPN level and configure a connection factory. You can use the Service Module and the JNDI Connection Factory Module to perform these tasks. This module will not check if the requirements are in place, however, if they aren't the configuration will fail.
msg_vpn_name
- Set todefault
in the example.endpoint_type
- Set totopic_endpoint
in the example.endpoint_name
- Set totestJT
in the example.permission
- Set toconsume
in the example to enable the receiver app to remove consumed messages from the topic endpoint.
jndi_topic_name
: if provided then the topic endpoint will be exposed to JNDI under this name
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_topic_endpoint".
The module provisioned_topic endpoint
output refers to the created topic endpoint.
The module provisioned_jndi_topic endpoint
output refers to the created JNDI topic resource.
This example will create the following resources:
solacebroker_msg_vpn_topic endpoint
solacebroker_msg_vpn_jndi_topic endpoint
ifjndi_topic_name
has been 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-solacebroker-queue-endpoint.git
cd examples/topic-endpoint-with-jndi
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 Topic Endpoints section in the PubSub+ documentation.