【发布时间】:2021-11-09 11:15:30
【问题描述】:
我使用 Spring Boot 为 Rabbitmq 实现了 RelayMessageBroker,并按预期工作。我通过 SockJS 使用 JavaScript-Client 来订阅队列并接收/发送消息。
我只是在尝试使用 stomp 事务时遇到问题。
我的 JS 代码:
var tx = clientRef.client.begin();
clientRef.client.send("/queue/onnext", {
transaction: tx.id,
durable:false,
exclusive:false,
"auto-delete":false
}, 'test123');
tx.commit()
Spring 关闭连接并报错:
o.s.m.s.s.StompBrokerRelayMessageHandler : Received ERROR {message=[Bad transaction], content-type=[text/plain], version=[1.0,1.1,1.2], content-length=[39]} session=wajdofjf, user=test text/plain payload=Invalid transaction identifier: "tx-1"
【问题讨论】:
标签: spring-boot rabbitmq stomp sockjs