how to remove clients with semp in solace

巧了我就是萌 提交于 2020-01-03 06:37:01

问题


How remove client by semp in solace.I try it like follows:

<rpc xmlns="http://www.solacesystems.com/semp/topic_routing/d35m1">
<no><client-username><username>user1</username>    
<vpn-name>jiavpn</vpn-name>   </client-username></no></rpc>

but it alert me "Command is not allowed via SEMP over the message bus", did it have some relation with the SEMP TOPIC,my topic is #SEMP/soalce1/SHOW. thanks for answer


回答1:


Answer is invalid. There is an error with the documentation which will be fixed in the next major release.


The disconnect SEMP over message bus command is an Client Admin EXEC command, and needs to be sent to #SEMP/<router name>/ADMIN/CLIENT instead of #SEMP/<router name>/SHOW.

From the user guide,

• Client Admin EXEC commands—These commands enable applications to clear and reset the given client’s event notification for a specified one-shot event or to disconnect the client. The following client admin EXEC commands can be executed over the message bus:
- admin client <name> message-vpn <vpn-name> [primary][backup] [static] clear-event <event-name>
- admin client <name> message-vpn <vpn-name> [primary][backup] disconnect

...

• #SEMP/<router name>/ADMIN/CLIENT—The command topic destination for Client Admin EXEC commands, which enable applications to clear and reset the given client’s event notification for a specified one-shot event or to disconnect the client.

Note that you will need to enable Admin and Client SEMP over Message Bus Commands for the message VPN. Refer to the screenshot below for an example of how to do this.

Also note that the client application might be configured to automatically reconnect after a disconnect.




回答2:


Both of the following are SEMP commands that cannot be executed over the message bus.

Deleting a client-username:

<rpc xmlns="http://www.solacesystems.com/semp/topic_routing/d35m1">
    <no>
        <client-username>
            <username>user1</username>    
            <vpn-name>jiavpn</vpn-name>   
        </client-username>
    </no>
</rpc>

Disconnecting a client:

<rpc semp-version="soltr/7_1_1">
    <admin>
        <client>
           <name>jiajie</name>
           <vpn-name>jiajievpn‌​</vpn-name>
           <disconnect/>
        </client>
   </admin>
</rpc>

Only a limited subset of commands are available for SEMP over message bus. The complete list can be found in Available SEMP Over Message Bus Commands. Note that there is currently an error in the documentation that will be fixed in the next major release - Disconnecting clients are not allowed via message bus despite the documentation saying so.



来源:https://stackoverflow.com/questions/36759396/how-to-remove-clients-with-semp-in-solace

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!