为什么我会在我的STOMP协议消息中附加随机文本?

时间:2021-07-15 20:51:11

I'm having an issue where I'm able to write many json encoded arrays to HornetQ without any problem, but when I try to read the frames back, every n'th message has random text appended to it (usually MESSAGE or RECEIPT).

我有一个问题,我能够毫无问题地向HornetQ编写许多json编码数组,但是当我尝试读取帧时,每个第n条消息都附加了随机文本(通常是MESSAGE或RECEIPT) 。

Example:

I send the following to HornetQ:

我发送以下内容给HornetQ:

{"data":9933753,"more_data":"Some Text"} 

and I get back the following when I read the frame body:

当我读到框架体时,我得到了以下内容:

{"data":9933753,"more_data":"Some Text"}  

MESSAGE subscription:subscription/jms.queue.testing.qa.myqueue message-id:1310 
destination:jms.queue.testing.qa.myqueue expires:0 redelivered:false priority:4 timestamp:1382637077839 

I read the STOMP protocol definition and I still don't get how I can get back just the json string that I sent without the extra text seeing as the MESSAGE is in the body itself (making it impossible to decode it back without doing hacky string manipulations).

我读了STOMP协议定义,我仍然不知道如何只返回我发送的json字符串而没有额外的文本,因为MESSAGE在主体本身(使得无法在不执行hacky字符串的情况下解码它操作)。

I have the following setup: HornetQ (latest) PHP 5.4 STOMP library: http://stomp.fusesource.org/documentation/php/book.html

我有以下设置:HornetQ(最新)PHP 5.4 STOMP库:http://stomp.fusesource.org/documentation/php/book.html

Any suggestions are appreciated!

任何建议表示赞赏!

1 个解决方案

#1


0  

It's a bug probably. there was a fix around that at some point as I remember. If you are still seeing it with the latest version you have to provide a testcase to the developers and we would gladly fix it. I'm speaking here as one of the developers.

这可能是一个bug。我记得在某些时候有一个解决方法。如果您仍然使用最新版本,您必须为开发人员提供测试用例,我们很乐意解决它。我在这里作为开发人员之一发言。

But first check if you are on the latest version. (2.3.0+ or 2.4.0 beta), or any latest EAP version.

但首先检查您是否使用最新版本。 (2.3.0+或2.4.0 beta),或任何最新的EAP版本。

#1


0  

It's a bug probably. there was a fix around that at some point as I remember. If you are still seeing it with the latest version you have to provide a testcase to the developers and we would gladly fix it. I'm speaking here as one of the developers.

这可能是一个bug。我记得在某些时候有一个解决方法。如果您仍然使用最新版本,您必须为开发人员提供测试用例,我们很乐意解决它。我在这里作为开发人员之一发言。

But first check if you are on the latest version. (2.3.0+ or 2.4.0 beta), or any latest EAP version.

但首先检查您是否使用最新版本。 (2.3.0+或2.4.0 beta),或任何最新的EAP版本。