unSubscribe to a solcache topic

alinaqvi Member Posts: 35

Currently we use the following code to subscribe to a solcache topic:

   cacheSession.sendCacheRequest(Long.valueOf(10011l), "my/topic", true, 
                new CacheRequestListener() {

                    public void onException(Long arg0, Topic arg1, JCSMPException arg2) {

                        LOG.error("Consumer Received exception for solace-cache-topic:" + arg2);


                    public void onComplete(Long arg0, Topic arg1, CacheRequestResult arg2) {

                        String str = String.format("Completed Cache Request for topic: %s with status: %s", arg1.getName(), arg2);



Is there any way to unSubscribe to this async request(when needed) so that we dont keep on receiving any new messages being published on this topic?

Many Thanks,

Best Answer