简体   繁体   English

如何使用PHP踩踏库创建临时队列?

[英]How do you create a temporary queue using PHP stomp library?

I'm using the PHP Stomp Client (version 1.0.0) to connect and send messages to ActiveMQ (version 5.7.0). 我正在使用PHP Stomp Client (版本1.0.0)连接并向ActiveMQ (版本5.7.0)发送消息。

I have read that if you subscribe to a destination called "/temp-queue/" , this will trigger ActiveMQ to create a temporary queue. 我已经读到,如果您订阅一个名为"/temp-queue/"的目的地,这将触发ActiveMQ创建一个临时队列。

However when I try this it creates a queue called "queue://temp-queue" instead of a temporary queue. 但是,当我尝试此操作时,它将创建一个名为"queue://temp-queue"而不是一个临时队列。

Is there any way to get Stomp to create a temporary queue on ActiveMQ? 有什么办法让Stomp在ActiveMQ上创建一个临时队列?

If you are trying to create the temp queue and only using the name "/temp-queue/" then that's the problem, the temp-queue portion is the destination prefix, you still need to give it a name like "/temp-queue/1234" or some such. 如果您尝试创建临时队列并且仅使用名称"/temp-queue/"那么就是问题所在,临时队列部分是目标前缀,您仍然需要为其命名,例如"/temp-queue/1234"或类似的名称。 Usually the name value comes from a UUID or some other unique Id generator. 通常,名称值来自UUID或其他唯一ID生成器。

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

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