book
Article ID: KB0087201
calendar_today
Updated On:
Description
Resolution:
Indeed, "delete rvcmlistener" works only with statically defined rvcmlisteners, that is, the one that were created with "create rvcmlistener".
Still, it is possible to remove rvcm listeners that were dynamically created.
First, a listener can cancel its certified agreement. When you call the TibrvCmListener.destroy() method, there is a parameter "cancelAgreements" that if set to true, will cause the RVCM publisher (in this case EMS Server) to remove the rvcm listener information.
Second, if you want to remove the RVCM listener that was dynamically created, you can use the "create rvcmlistener" command first, then the "delete rvcmlistener".
Here is an example. I have an RVCM tranport defined and a topic called "topic.sample.exported" with the export=RVCM property. I start an RVCM listener that listens to "topic.sample.exported" with cm name "cm.listener.cmname". I then send 3 JMS messages on "topic.sample.exported". A show rvcmtransportledger shows:
tcp://localhost:7222> show rvcmtransportledger RVCM
Subject: topic.sample.exported
seq num of last sent msg: 3
total msgs stored: 0 msgs
total size: 0 bytes
listeners:
name last conf seq num
* cm.listener.cmname 3
You see the "*" which means that the listener is a dynamic one.
Now suppose that the RVCM application has been stopped and we don't want the EMS Server to maintain messages in its RVCM ledger for that listener anymore. As mentioned before, we could restart the RVCM listener so that it calls its cm listener "destroy(true)" method.
Or, we could do the following:
tcp://localhost:7222> create rvcmlistener RVCM cm.listener.cmname topic.sample.exported
rvcmlistener 'RVCM' 'cm.listener.cmname' 'topic.sample.exported' has been created
tcp://localhost:7222> show rvcmtransportledger RVCM
Subject: topic.sample.exported
seq num of last sent msg: 3
total msgs stored: 0 msgs
total size: 0 bytes
listeners:
name last conf seq num
cm.listener.cmname 3
See that now the "*" has disappeared. It is now a statically defined rvcm listener.
We can now delete it.
tcp://localhost:7222> delete rvcmlistener RVCM cm.listener.cmname topic.sample.exported
Are you sure (yes,no)? y
rvcmlistener 'RVCM' 'cm.listener.cmname' 'topic.sample.exported' has been deleted
tcp://localhost:7222> show rvcmtransportledger RVCM
Subject: topic.sample.exported
seq num of last sent msg: 3
total msgs stored: 0 msgs
total size: 0 bytes
listeners:
<no rvcmlisteners found>
Issue/Introduction
It seems that I can not use "delete rvcmlistener" if the RVCM listener was not first created with "create rvcmlistener". So how can I remove a rvcmlistener that was "dynamically" created?