The easiest option is to actually request for a limited management account with only read/write permission on your message-vpn from your adminstrators.
Then, you can make use of the management tools such as SolAdmin to manage your VPN.
Failing that, this can be done by executing the a SEMP over message bus command.
Publish the following message to topic #SEMP/<router name>/ADMIN/DISTRIBUTED-CACHE
<rpc>
<admin>
<distributed-cache>
<name>myDistributedCacheName</name>
<vpn-name>myVpnName</vpn-name>
<delete-messages>
<topic>my/topic/name</topic>
</delete-messages>
</distributed-cache>
</admin>
</rpc>
Wildcards can be specified in the topic string. For example, using a topic string of ">" will delete all messages in the cache.
Note that your message-vpn must be configured to:
- Allow SEMP over Message Bus
- Allow Admin Commands
- Allow Distributed Cache Commands
Details on enabling these features in your message-vpn can be found here.
Details on Publishing SEMP Requests over the Message Bus can be found here. Alternatively, refer to the SempGetOverMB.java sample that is provided with the Solace Java API.