dansimpson / amqp-js Goto Github PK
View Code? Open in Web Editor NEWA push enabled AMQP Client for Javascript
A push enabled AMQP Client for Javascript
RabbitMQ server v. 1.7.0
This error was encountered when receiveing big messages:
Error: Error #2030: End of file was encountered.
at flash.net::Socket/readBytes()
at org.ds.amqp.connection::Stream/readPayload()[D:\Code\AMQPFlash08\src\org\ds\amqp\connection\Stream.as:47]
at org.ds.amqp.connection::Stream/readFrame()[D:\Code\AMQPFlash08\src\org\ds\amqp\connection\Stream.as:36]
at org.ds.amqp.connection::Connection/onDataReceived()[D:\Code\AMQPFlash08\src\org\ds\amqp\connection\Connection.as:182]
I have such exchanges
MQ.topic( "games" ).publish({ value: "Hello" }, "game_1");
MQ.topic( "games" ).publish({ value: "Hello" }, "game_2");
How can i create a subscriptions to receive messages for game_1 and game_2 and combined subscriptions?
I've try to do some thing like:
MQ.queue("auto").bind( "games", "game_*").callback(function(m){
alert( m.data.value );
});
but it doesn't work, I've enabled the logging and the messages are comming but it seems like it can't find a binding or some thing,
Thaks for help.
I wan't my web app to be able to reconnect to my AMQP server after it has been disconnected (for example, after putting their laptop to sleep).
So I listened to the disconnect
event, and then planned to keep trying to reconnect after a number of seconds.
However, when I try to reconnect, by calling connect
on the MQ
object, it reconnects to the AMQP server but does not open the channels, therefore not getting any new data.
Heres what my code looks like:
MQ.on('disconnect', function(){
// possibly use a setTimeout
MQ.connect();
});
I test this by going to the Rabbit MQ admin console and force-disconnecting my client.
I have tried alternatives to connect
, such as onLoad
, etc, but still no solution.
Hello.
I'm trying to connect to my rabbitmq server using:
MQ.configure({
logger: console,
logLevel: 1,
host: "xxx.xxx",
user: "tribune",
password: "tribune",
vhost: "/tribune"
});
In the rabbitmq log:
exception on TCP connection <0.10995.1> from 92.140.75.xx:6093
{channel0_error,opening,
{amqp_error,access_refused,
"access to vhost '/tribune' refused for user 'guest'",
'connection.open'}}
I've checked in DOM using firebug, MQ is well configured with correct user and password from MQ.configure part, but it seems the flash does not see the conf.
Can I do something to send more info?
Thanks.
I have a RabbitMQ running locally.
If I don't specify the host parameter in MQ.configure it connects to the local RabbitMQ just fine and I can send and receive messages. However if I specify localhost, 127.0.0.1 or the local IP nothing happens. The client logs "Attempting to Connect" but nothing more.
I have tried Firefox, WebKit and Chrome. Same results.
I have made sure the policy server is logging successful policy deliveries in both cases.
Any ideas?
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
Message content bodies should be split across multiple frames when exceeding the negotiated maximum frame size (actually frame_max-8 since the size includes the header and frame end marker). Doesn't look like that is happening.
Currently the RabbitMQ server doesn't complain when clients send frames larger than the negotiated frame size. But that is a DoS vector and therefore we are planning to change the broker to reject such frames.
So amqp-js really needs to start performing the required fragmentation or things will break against future version of RabbitMQ.
I've noticed that there is a possible actionscript memory leak when the client receives messages.
This issue can be reproduced with the following methods.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.