久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Websockets、SockJs、Stomp、Spring、RabbitMQ,自動刪除用

Websockets, SockJs, Stomp, Spring, RabbitMQ, delete User specific Queues automatically(Websockets、SockJs、Stomp、Spring、RabbitMQ,自動刪除用戶特定隊列)
本文介紹了Websockets、SockJs、Stomp、Spring、RabbitMQ,自動刪除用戶特定隊列的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我希望有人可以幫助我解決這個問題.我正在使用帶有 SockJs 和 StompJs 的 Spring 的 Websocket 支持.我訂閱了這樣的隊列:

I hope someone can help me with this issue. I am using the Websocket support of Spring with SockJs and StompJs. I subscribed to a queue like this:

    var socket = new SockJS(localhost + 'websocket');
    stompClient = Stomp.over(socket);
    stompClient.connect('', '', function(frame) {
        stompClient.subscribe("/user/queue/gotMessage", function(message) {
            gotMessage((JSON.parse(message.body)));
        });
    }, function(error) {
    });

這對 Spring 的 SimpMessageSendingOperations 非常有效.但是有一個大問題.隊列名稱如下所示: gotMessage-user3w4tstcj 并且沒有聲明為自動刪除隊列,但這正是我想要的.否則,我有 10k 個未使用的隊列.在隊列沒有消費者的那一刻,應該刪除隊列.我怎么能假設這個?

This works really fine with the SimpMessageSendingOperations of Spring. BUT there is one big problem. The Queue name looks like this: gotMessage-user3w4tstcj and it's not declared as an auto delete queue, but this is what I want. Otherwise, I have 10k unused queues. In that moment where the queue has no consumer, the queue should be deleted. How can I assume this?

推薦答案

有同樣的問題,來自文檔:

had same problem, from the documentation:

RabbitMQ 在目的地像使用/exchange/amq.direct/position-updates.所以在那種情況下客戶端可以訂閱/user/exchange/amq.direct/position-updates

RabbitMQ creates auto-delete queues when destinations like /exchange/amq.direct/position-updates are used. So in that case the client could subscribe to /user/exchange/amq.direct/position-updates

記得在 stomp 代理中繼配置中添加/exchange/"作為目標前綴

remember to add '/exchange/' as a destination prefix in stomp broker relay configuration

這篇關于Websockets、SockJs、Stomp、Spring、RabbitMQ,自動刪除用戶特定隊列的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Parsing an ISO 8601 string local date-time as if in UTC(解析 ISO 8601 字符串本地日期時間,就像在 UTC 中一樣)
How to convert Gregorian string to Gregorian Calendar?(如何將公歷字符串轉換為公歷?)
Java: What/where are the maximum and minimum values of a GregorianCalendar?(Java:GregorianCalendar 的最大值和最小值是什么/在哪里?)
Calendar to Date conversion for dates before 15 Oct 1582. Gregorian to Julian calendar switch(1582 年 10 月 15 日之前日期的日歷到日期轉換.公歷到儒略歷切換)
java Calendar setFirstDayOfWeek not working(java日歷setFirstDayOfWeek不起作用)
Java: getting current Day of the Week value(Java:獲取當前星期幾的值)
主站蜘蛛池模板: 午夜精品福利视频 | 宅男伊人 | 欧美日韩国产精品一区二区 | 在线观看av网站 | 国产成人精品久久二区二区91 | 在线一级片 | 午夜影视免费片在线观看 | 日本免费小视频 | 一区二区免费看 | 8x国产精品视频一区二区 | 精品成人69xx.xyz | 欧美精品一区三区 | 久久99精品久久久97夜夜嗨 | 亚洲成人精品在线 | 在线观看视频一区二区三区 | 成人精品一区二区三区中文字幕 | 精品无码久久久久久国产 | 日韩免费一二三区 | 久久久av| 国产美女特级嫩嫩嫩bbb片 | 久久精彩| 亚洲欧洲一区 | 午夜影院官网 | 不卡一区二区在线观看 | 亚洲精品自拍 | av首页在线 | 日韩欧美精品在线 | 欧美性受xxx| 99re6在线视频精品免费 | 亚洲国产精品激情在线观看 | 成年视频在线观看福利资源 | 中文福利视频 | 日本一区二区三区在线观看 | 亚洲欧美日韩电影 | 国产成人久久 | 欧美区在线| 国产成人小视频 | 欧美在线日韩 | 五月天婷婷久久 | 99热首页| 日韩成人在线视频 |