简体   繁体   中英

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).

I have read that if you subscribe to a destination called "/temp-queue/" , this will trigger ActiveMQ to create a temporary queue.

However when I try this it creates a queue called "queue://temp-queue" instead of a temporary queue.

Is there any way to get Stomp to create a temporary queue on 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. Usually the name value comes from a UUID or some other unique Id generator.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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