How to export queue configuration with SEMP API

Options
I'm building a process to integrate Solace with CI/CD, where we need to export the queues from Dev to UAT as part of the deployment process.
Basically developer create the queues in DEV using UI and then its moved to upper envs with automation.
I could not find a way to export specific queues configurations using SEMP, need some help.

Best Answer

  • hankspencer
    hankspencer Member, Employee Posts: 2 Solace Employee
    #2 Answer ✓
    Options

    Hi @tbueno ,

    There are two SEMP API endpoints that you'll need to retrieve the queue configuration and two additional endpoints that should enable you to re-create the queue on a different event broker, in this case your UAT event broker.

    If you already know the name of the queue you need to export, you can retrieve the queue configuration with the Get a Queue object endpoint. Once you've done that, you'll need to retrieve the queue subscriptions via the Get a list of Queue Subscription objects endpoint.

    Once you have the queue configuration from the original environment, you can use the Create a Queue object and Create a Queue Subscription object endpoints to create the queue in the new environment.

    Note that the body for both of the Create requests contain a "msgVpnName" field that needs to be updated to reflect the name of the message VPN in the new environment.

    The URL below can be used to download the full SEMP OpenAPI spec for your event broker service.

    http://<host>:<port>/SEMP/v2/<api>/spec
    

    See SEMP API Reference for more details.

Answers

  • hankspencer
    hankspencer Member, Employee Posts: 2 Solace Employee
    #3 Answer ✓
    Options

    Hi @tbueno ,

    There are two SEMP API endpoints that you'll need to retrieve the queue configuration and two additional endpoints that should enable you to re-create the queue on a different event broker, in this case your UAT event broker.

    If you already know the name of the queue you need to export, you can retrieve the queue configuration with the Get a Queue object endpoint. Once you've done that, you'll need to retrieve the queue subscriptions via the Get a list of Queue Subscription objects endpoint.

    Once you have the queue configuration from the original environment, you can use the Create a Queue object and Create a Queue Subscription object endpoints to create the queue in the new environment.

    Note that the body for both of the Create requests contain a "msgVpnName" field that needs to be updated to reflect the name of the message VPN in the new environment.

    The URL below can be used to download the full SEMP OpenAPI spec for your event broker service.

    http://<host>:<port>/SEMP/v2/<api>/spec
    

    See SEMP API Reference for more details.