Binding to Solace Messaging Service Instances

This topic describes how developers can bind an app to instances of the Solace Messaging service.

About Bindings

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 solace-messaging-instance as discussed in Service Instances and that you have a deployed app called web-backend.

The procedures show you how to bind this service instance to the app named web-backend.

Bind a Service Instance with the cf CLI

To bind an instance of the Solace Messaging service with the cf Command Line Interface (CLI) tool, perform the following steps:

  1. 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...
    API endpoint:  https://api.YOUR-SYSTEM-DOMAIN (API version: 2.59.0)
    Not logged in. Use 'cf login' to log in.

  2. Log in to your deployment and select an org and a space.

    $ cf login
    API endpoint: https://api.YOUR-SYSTEM-DOMAIN

  3. Locate the previously created service.

    $ cf services
    Getting services in org example / space dev as

    name service plan bound apps last operation solace-messaging-instance solace-messaging large-ha create succeeded

  4. Bind the instance to an app called web-backend.

    $ cf bind-service web-backend solace-messaging-instance
    Binding service solace-messaging-instance to app web-backend in org example / space development as
    TIP: Use 'cf restage web-backend to ensure your env variable changes take effect

  5. Restage the app for the binding to take effect.

    $ cf restage web-backend

Bind a Service Instance in Apps Manager

To bind an instance of the Solace Messaging service in Apps Manager, perform the following steps:

  1. Navigate to apps.YOUR-SYSTEM-DOMAIN in a browser and log in.
  2. Select the org and space in which you wish to create the Solace Messaging service.
  3. Click Apps, click the app name web-backend, click Services, then click Bind a Service. Appsmanager solace messaging service list empty
  4. Select a service instance to bind to the app and click Bind. Appsmanager solace messaging bind service selected
  5. After the service is bound, you can find it listed under Services. Appsmanager solace messaging service list has service
Create a pull request or raise an issue on the source for this page in GitHub