Creating and Binding Solace Messaging Service Instances
This topic describes how developers create and bind instances of the Solace Messaging service.
After deploying the Solace Messaging for Pivotal Cloud Foundry (PCF) tile, the Solace Messaging service appears in the Marketplace. Developers can use either the Cloud Foundry Command Line Interface (cf CLI) or Apps Manager to create an instance of the service and bind it to applications that need to exchange messages.
Each service instance represents a Message VPN on a Solace Virtual Message Router (VMR). By binding an application to the instance, developers give the application permission to access this Message VPN through a client username. For more information about how developers can use the credentials provided by the binding, see the Understanding Solace Messaging Credentials topic.
Creating a service instance also gives the developer permissions to manage the Message VPN through the SolAdmin administration tool. For more information, see the Managing the Message VPN topic.
The following tutorials will show you how to create a Solace Messaging service called solace-messaging-instance and bind this service instance to an application named web-backend.
To create and bind an instance of the Solace Messaging service with the cf CLI, perform the following steps:
- Set your API endpoint to the Cloud Controller of your deployment.
$ cf api api.YOUR-SYSTEM-DOMAIN Setting api endpoint to api.YOUR-SYSTEM-DOMAIN... OK API endpoint: https://api.YOUR-SYSTEM-DOMAIN (API version: 2.59.0) Not logged in. Use 'cf login' to log in.
- Log in to your deployment and select an org and a space.
$ cf login API endpoint: https://api.YOUR-SYSTEM-DOMAIN Email> firstname.lastname@example.org Password>
List the Marketplace services and locate the Solace Messaging service and its associated service plans.
$ cf marketplace Getting services from marketplace in org example / space development as email@example.com... OK
service plans description solace-messaging shared, large, community, medium-ha, large-ha Solace Messaging for real-time, multi-protocol data distribution
Create an instance of the Solace Messaging service. Select the appropriate service plan for your application. See PCF Marketplace Plans for how the service plans differ. The following example uses the
$ cf create-service solace-messaging shared solace-messaging-instance Creating service instance solace-messaging-instance in org example / space development as firstname.lastname@example.org... OK
Bind the instance to an application.
$ cf bind-service web-backend solace-messaging-instance Binding service solace-messaging-instance to app YOUR-APP in org example / space development as email@example.com... OK TIP: Use 'cf restage web-backend to ensure your env variable changes take effect
Restage the application for the binding to take effect.
$ cf restage web-backend
To create and bind an instance of the Solace Messaging service in Apps Manager, perform the following steps:
- Navigate to
apps.YOUR-SYSTEM-DOMAINin a browser and log in.
- Click Marketplace in the left navigation.
- Click Solace Messaging.
- Select the appropriate service plan for your application. See PCF Marketplace Plans for how the service plans differ.
- Enter an Instance Name and select a space under Add to Space. To bind the service instance to an application, select an application under Bind to App. Then click Add.
- You can also bind an application to a service instance by navigating to the application page, clicking Services, then clicking Bind a Service.
- Select a service instance to bind to the application and click Bind.