You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
STOMP over ws connection and send to topic are normal.
//1. in js, the subscribe could only trigger the latest callback
// console output only print "callback 3"
for(var i= 0;i<4;i++){
client.subscribe("/topic/topicid_"+i, function(message){
console.log("callback " + i);
});
}
// 2. if subscribe one by one, could get all console output
client.subscribe("/topic/topicid_"+0, function(message){
console.log("callback " + 0);
});
client.subscribe("/topic/topicid_"+1, function(message){
console.log("callback " + 1);
});
client.subscribe("/topic/topicid_"+2, function(message){
console.log("callback " + 2);
});
client.subscribe("/topic/topicid_"+3, function(message){
console.log("callback " + 3);
});
any idea or solution to solve this issue?
The text was updated successfully, but these errors were encountered:
STOMP over ws connection and send to topic are normal.
//1. in js, the subscribe could only trigger the latest callback
// console output only print "callback 3"
for(var i= 0;i<4;i++){
client.subscribe("/topic/topicid_"+i, function(message){
console.log("callback " + i);
});
}
// 2. if subscribe one by one, could get all console output
client.subscribe("/topic/topicid_"+0, function(message){
console.log("callback " + 0);
});
client.subscribe("/topic/topicid_"+1, function(message){
console.log("callback " + 1);
});
client.subscribe("/topic/topicid_"+2, function(message){
console.log("callback " + 2);
});
client.subscribe("/topic/topicid_"+3, function(message){
console.log("callback " + 3);
});
any idea or solution to solve this issue?
The text was updated successfully, but these errors were encountered: