dansimpson / amqp-js

A push enabled AMQP Client for Javascript
120 stars 10 forks source link

505 unexpected-frame #7

Closed superbobry closed 13 years ago

superbobry commented 13 years ago

Hello, can you please clarify what inputs are valid for publish(), I've been trying to send a String and got:

> MQ.direct("foo.bar").publish("bar", "foo")
Connection Closing unexpectedly!,505,UNEXPECTED_FRAME - expected content body, got non content body frame instead
DOBRO commented 13 years ago

Hi,

try this:

MQ.direct("foo.bar").publish({bar: "bar"}, "foo")

06.07.2011, 16:17, "superbobry" reply@reply.github.com:

Hello, can you please clarify what inputs are valid for publish(), I've been trying to send a String and got:

 MQ.direct("foo.bar").publish("bar", "foo")

    Connection Closing unexpectedly!,505,UNEXPECTED_FRAME - expected content body, got non content body frame instead

Reply to this email directly or view it on GitHub: https://github.com/dansimpson/amqp-js/issues/7

superbobry commented 13 years ago

Thanks, I know this works. I just don't see a reason for this limitation -- why Objects-only?

DOBRO commented 13 years ago

It's because of convenient way of parsing frame body on the server side.

08.07.2011, 11:49, "superbobry" reply@reply.github.com:

Thanks, I know this works. I just don't see a reason for this limitation -- why Objects-only?

Reply to this email directly or view it on GitHub: https://github.com/dansimpson/amqp-js/issues/7#issuecomment-1530913

dansimpson commented 13 years ago

Dobro, thanks for handling that.