I'm using solcache and instead of getting our admins to reset the cache, it would be nice to be able to use the Java API to clear entries. I'm not seeing any way to do this. Can you help, or do I need full admin privileges to do so?
There are a few ways of going about this, with the easiest being to request that you admin(s) grant you a limited management account with only RW on your message-vpn. This enables you to use SolAdmin to manage your VPN.
If that's not an option, then the other way would be sending a SEMP command over the message bus. You would publish the below message to topic #SEMP/<router_name>/ADMIN/DISTRIBUTED-CACHE:
You can use wildcards in the topic string, so for example using a topic string of > will delete all messages in the cache..
A few things to note is that your message-vpn must be configured with the following options:
You can find more info around enabling these features in your message-vpn here, with details on Publishing SEMP Requests over the Message Bus here. We also have a SempGetOverMB.java sample that is provided with the Solace Java API.
I hope this helps!
That did it! Thanks!