简体   繁体   English

如何以客户端的身份获取Stomp队列或主题列表(名称)?

[英]How to get a list of Stomp queues or/and topics (their names) as a client?

In Stomp, how can I browse all queues or/and topics available? 在Stomp中,如何浏览所有可用的队列或主题? Is it possible at all? 有可能吗?

The key here is to get the result and the language is not important, it can be either python, ruby or java because as I've found out it's easier to do this particular task using them because of the existing libraries. 这里的关键是获得结果,而语言也不重要,它可以是python,ruby或java,因为我发现由于现有的库,使用它们执行此特定任务会更容易。 Python seems to have only one most popular library, though. 不过,Python似乎只有一个最受欢迎的库。

Well, the simple answer is that you can't. 好吧,简单的答案就是你做不到。 That's not part of the Stomp protocol. 这不是Stomp协议的一部分。

The complex answer, as always, is "it depends". 一如既往,复杂的答案是“取决于”。 It's entirely possible that whatever is providing your stomp service will have something that you can use. 无论提供脚踏服务的任何事物都有可能可以使用。 (In RabbitMQ, for example, you can log in to the web interface and look at the current queue names). (例如,在RabbitMQ中,您可以登录Web界面并查看当前的队列名称)。

However the whole point of Stomp (and to a certain extent in all messaging) is that there aren't really "desintations", just queues which can be read by one or more clients. 但是,Stomp的要点(在所有消息传递中一定程度上)是,实际上并没有“目标”,只有一个或多个客户端可以读取的队列。 And the queues are transient; 队列是短暂的; you might find the information deprecates pretty quickly... 您可能会很快发现该信息过时了...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM