COMMAND_INVALID - expected content body

54 views
Skip to first unread message

DOBRO

unread,
Jun 4, 2010, 5:04:25 AM6/4/10
to amqp-js
Hi Dan,

I ran into issue regarding publishing message which contained
characters in non-EN_US locale.
There were Russian (cyrillic) characters for the present instance.

When I try to publish such message the connection is closed with error
in Firebug console:

--- Begin ConnectionClose ---
replyCode = 503;
replyText = COMMAND_INVALID - expected content body, got non content
body frame instead;
classId = 0;
methodId = 0;
---- End ConnectionClose ----

Connection Closing unexpectedly!,503,COMMAND_INVALID - expected
content body, got non content body frame instead

----------------------------------------------------

I guess any text should be UTF8-encoded before it is published. And
when the message is received it should be UTF8-decoded.

Thanks,
DOBRO.

DOBRO

unread,
Jun 4, 2010, 6:06:26 AM6/4/10
to amqp-js
BTW, it would be very helpful to implement error handler
( MQ.on("error", function (code, string) { ... } ) ) which would
retrieve the error code and error string.

Dan Simpson

unread,
Jun 4, 2010, 1:40:55 PM6/4/10
to amq...@googlegroups.com
From what I recall, the content is UTF8 encoded. Can you send me the message that was giving you issues, so I can replicate.

I agree with your suggestion regarding the error handler.

I will try to get to your suggestions this weekend.  Feel free to submit any patches *wink*

--Dan


--
You received this message because you are subscribed to the Google Groups "amqp-js" group.
To post to this group, send email to amq...@googlegroups.com.
To unsubscribe from this group, send email to amqp-js+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/amqp-js?hl=en.


DOBRO

unread,
Jun 4, 2010, 3:49:39 PM6/4/10
to amqp-js
The error is caused by publishing any message in Russian. For example,
"привет".

One more question. Why onDisconnect event does not fire if the
connection is closed unexpectedly?

And another one :). How can I submit patches?

Thank you for support.
DOBRO.

Dan Simpson

unread,
Jun 4, 2010, 5:56:55 PM6/4/10
to amq...@googlegroups.com
The best way to submit patches, is to create a fork of amqp-js on github.  Then, make your changes that you need and commit your changes to that fork.  When you think those changes should be integrated into the my fork, submit a "pull" request via github.  This will allow me to merge your changes into my fork.

If you contribute frequently, I will give you access to commit directly to the main repository.

Thanks


--

DOBRO

unread,
Jun 5, 2010, 1:37:11 AM6/5/10
to amqp-js
Dan,

I forgot to say that there is a sequence of moves to get the error.

Let me tell you what I exactly do.

1. Declare exchange, its type doesn't matter.
2. Bind queue to the echange.
3. Call function "publish" with the message "привет" first time.
Firebug console shows " --- Begin BasicPublish...... " etc. But it
does not notify about the message received, though the queue is bound
to the exchange.
4. Call function "publish" with any message second time, get the
error. Doesn't matter which characters the message contains.
5. Call function "publish" with any message third time and get another
error:
"uncaught exception: Error in Actionscript. Use a try/catch block to
find error."

DOBRO.

Reply all
Reply to author
Forward
0 new messages