Binding to Solace Messaging Service Instances
This topic describes how developers can bind an app to instances of the Solace Messaging service.
For an app deployed in Pivotal Cloud Foundry (PCF) to obtain credentials for a Solace Messaging service instance, a developer needs to bind the app to the service instance.
Binding the app to a service instance produces Solace Messaging Credentials,
which become available in the
VCAP_SERVICES environment variable for the app as deployed in PCF.
Unbindng the app from the service instance revokes the credentials.
The following procedures assume you have created a Solace Messaging service called
as discussed in Service Instances and that you have a deployed app called
The procedures show you how to bind this service instance to the app named
To bind an instance of the Solace Messaging service with the cf Command Line Interface (CLI) tool, 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> email@example.com Password>
Locate the previously created service.
$ cf services Getting services in org example / space dev as firstname.lastname@example.org... OK
name service plan bound apps last operation solace-messaging-instance solace-messaging large-ha create succeeded
Bind the instance to an app called
$ cf bind-service web-backend solace-messaging-instance Binding service solace-messaging-instance to app web-backend 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 app for the binding to take effect.
$ cf restage web-backend
To 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.
- Select the org and space in which you wish to create the Solace Messaging service.
- Click Apps, click the app name web-backend, click Services, then click Bind a Service.
- Select a service instance to bind to the app and click Bind.
- After the service is bound, you can find it listed under Services.