/
Subscriptions Commands

Subscriptions Commands

Subscriptions Commands

Title

Namespace

Description

DDF :: Catalog :: Core :: PubSub Commands

subscriptions

The DDF PubSub Shell Commands provide functions to list the registered subscriptions in

DDF and to delete subscriptions.

The Subscriptions Commands are installed by default since they are in a bundle included in the catalog-core feature.

Subscriptions Commands

ddf@local>subscriptions:
subscriptions:delete    subscriptions:list  

Command Descriptions

CommandDescription
delete
Deletes the subscription(s) specified by the search phrase or LDAP filter.
list
List the subscription(s) specified by the search phrase or LDAP filter.

Listing Available System Console Commands

To get a list of commands, type in the namespace of the desired extension and press <tab>.


For example, type in: subscriptions, then <tab>

Getting Help for a System Console Command

For details on any command type help and then the subscriptions command. For example, help subscriptions:list

Example Help

ddf@local>help subscriptions:list
DESCRIPTION
        subscriptions:list
        Allows users to view registered subscriptions.
SYNTAX
        subscriptions:list [options] [search phrase or LDAP filter]
ARGUMENTS
        search phrase or LDAP filter
                Subscription ID to search for. Wildcard characters (*) can be used in the ID, e.g., my*name or *123. If an id is not provided, then
                all of the subscriptions are displayed.
OPTIONS
        filter, -f
                Allows user to specify any type of LDAP filter rather than searching on single subscription ID.
                You should enclose the LDAP filter in quotes since it will often have special characters in it.
                An example LDAP filter would be:
                (& (subscription-id=my*) (subscription-id=*169*))
                which searches for all subscriptions starting with "my" and having 169 in the ID, which can be thought of as part of an IP address.
                An example of the entire quote command would be:
                subscriptions:list -f ""(& (subscription-id=my*) (subscription-id=*169*))"
        --help
                Display this help message


The help command provides a description of the provided command, along with the syntax in how to use it, arguments it accepts, and available options.

subscriptions:list Command Usage Examples

Note that no arguments are required for the subscriptions:list command. If no argument is provided, then all subscriptions will be listed. A count of the subscriptions found matching the list command's search phrase (or LDAP filter) is displayed first, then each subscription's ID.

Listing all subscriptions

ddf@local>subscriptions:list

Total subscriptions found: 3

Subscription ID
my.contextual.id.v20|http://172.18.14.169:8088/mockCatalogEventConsumerBinding?WSDL
my.contextual.id.v30|http://172.18.14.169:8088/mockEventConsumerBinding?WSDL
my.contextual.id.json|http://172.18.14.169:8088/services/json-ddms/local/event/notification

Listing a specific subscription by ID

ddf@local>subscriptions:list "my.contextual.id.v20|http://172.18.14.169:8088/mockCatalogEventConsumerBinding?WSDL"

Total subscriptions found: 1

Subscription ID
my.contextual.id.v20|http://172.18.14.169:8088/mockCatalogEventConsumerBinding?WSDL

It is recommended to always quote the search phrase (or LDAP filter) argument to the command so that any special characters will be properly processed.

Listing subscriptions using wildcards

ddf@local>subscriptions:list "my*"

Total subscriptions found: 3

Subscription ID
my.contextual.id.v20|http://172.18.14.169:8088/mockCatalogEventConsumerBinding?WSDL
my.contextual.id.v30|http://172.18.14.169:8088/mockEventConsumerBinding?WSDL
my.contextual.id.json|http://172.18.14.169:8088/services/json-ddms/local/event/notification
 
 
 
ddf@local>subscriptions:list "*json*"

Total subscriptions found: 1

Subscription ID
my.contextual.id.json|http://172.18.14.169:8088/services/json-ddms/local/event/notification
 
 
 
ddf@local>subscriptions:list "*WSDL"

Total subscriptions found: 2

Subscription ID
my.contextual.id.v20|http://172.18.14.169:8088/mockCatalogEventConsumerBinding?WSDL
my.contextual.id.v30|http://172.18.14.169:8088/mockEventConsumerBinding?WSDL

Listing subscriptions using an LDAP filter

The example below illustrates searching for any subscription that has "json" or "v20" anywhere in its subscription ID.

ddf@local>subscriptions:list -f "(|(subscription-id=*json*) (subscription-id=*v20*))"

Total subscriptions found: 2

Subscription ID
my.contextual.id.v20|http://172.18.14.169:8088/mockCatalogEventConsumerBinding?WSDL
my.contextual.id.json|http://172.18.14.169:8088/services/json-ddms/local/event/notification

The example below illustrates searching for any subscription that has "json" and "172.18.14.169" in its subscription ID. This could be a handy way of finding all subscriptions for a specific site.

ddf@local>subscriptions:list -f "(&(subscription-id=*json*) (subscription-id=*172.18.14.169*))"

Total subscriptions found: 1

Subscription ID
my.contextual.id.json|http://172.18.14.169:8088/services/json-ddms/local/event/notification

subscriptions:delete Command Usage Example

The arguments for the subscriptions:delete command are the same as for the list command, except that a search phrase or LDAP filter must be specified. If one of these is not specified an error will be displayed.

When the delete command is executed it will display each subscription ID it is deleting. If a subscription matches the search phrase but cannot be deleted, a message in red will be displayed with the ID. After all matching subscriptions are processed, a summary line is displayed indicating how many subscriptions were deleted out of how many matching subscriptions were found.

Deleting a specific subscription by its exact ID

ddf@local>subscriptions:delete "my.contextual.id.json|http://172.18.14.169:8088/services/json-ddms/local/event/notification"

Deleted subscription for ID = my.contextual.id.json|http://172.18.14.169:8088/services/json-ddms/local/event/notification

Deleted 1 subscriptions out of 1 subscriptions found.

Deleting subscriptions using wildcards

ddf@local>subscriptions:delete "my*"

Deleted subscription for ID = my.contextual.id.v20|http://172.18.14.169:8088/mockCatalogEventConsumerBinding?WSDL
Deleted subscription for ID = my.contextual.id.v30|http://172.18.14.169:8088/mockEventConsumerBinding?WSDL

Deleted 2 subscriptions out of 2 subscriptions found.
 
 
 
 
ddf@local>subscriptions:delete "*json*"

Deleted subscription for ID = my.contextual.id.json|http://172.18.14.169:8088/services/json-ddms/local/event/notification

Deleted 1 subscriptions out of 1 subscriptions found.

Deleting all subscriptions

ddf@local>subscriptions:delete *

Deleted subscription for ID = my.contextual.id.v30|http://172.18.14.169:8088/mockEventConsumerBinding?WSDL
Deleted subscription for ID = my.contextual.id.v20|http://172.18.14.169:8088/mockCatalogEventConsumerBinding?WSDL
Deleted subscription for ID = my.contextual.id.json|http://172.18.14.169:8088/services/json-ddms/local/event/notification

Deleted 3 subscriptions out of 3 subscriptions found.

Deleting subscriptions using an LDAP filter

ddf@local>subscriptions:delete -f "(&(subscription-id=*WSDL) (subscription-id=*172.18.14.169*))"

Deleted subscription for ID = my.contextual.id.v20|http://172.18.14.169:8088/mockCatalogEventConsumerBinding?WSDL
Deleted subscription for ID = my.contextual.id.v30|http://172.18.14.169:8088/mockEventConsumerBinding?WSDL

Deleted 2 subscriptions out of 2 subscriptions found.