Comments (4)
You are right, that sounds very like the breakage due to me not using util#inherits (or the like), as reported in #35, #37 and #38, and supposedly fixed in 8b431bf and released in v0.2.1.
I'll have a closer look at your code and try it out.
Just to check:
- are you using rabbit.js 0.2.1?
- does it work in, e.g., Node.JS 10.3? (that's 10-series, but before the problems in those issues)
from rabbit.js.
I'm surprised that runs as-is, since it doesn't synchronise on the context being open (emitting 'ready').
If I stitch that in, the tests appear to run OK. That's with rabbit.js v0.2.1, and Node.JS 0.10.4 and 0.10.12.
it('should open a publish stream', function(done){
log('open')
bus.rabbitContext.on('ready', function() {
bus.publish('sometestpub', function(err, stream){
log('stream', 'publish');
stream.should.exist;
stream.write("TEST TEST", 'utf8');
done()
})
})
})
from rabbit.js.
This did indeed resolve my issue, that said I think the challenge here is that, and correct me if i am wrong this "ready" event is only emitted once, so I pretty much have it around the first test and then assume in the next one that the context is in a ready state. I am not entirely keen on this, but having had a look at what you have to work with I understand with this limitations.
Originally I was trying to use the connect callback, but again this only fired on the first test, so the second would time out.
Cheers for taking the time to check it over for me, your guidance is much appreciated.
from rabbit.js.
Events and callbacks are almost no use for synchronisation, it is true. My adjustment was pretty crude -- just enough to delay the test run, given some assumptions (specifically that the test harness serialises tests).
I am now seeing some "send 'channel.open' seen" errors, in a different scenario. So I'm not sure it's entirely down to the problems fixed already. Stay tuned ...
from rabbit.js.
Related Issues (20)
- update dependencies and fix verion warnings HOT 1
- cannot connect to SUB HOT 1
- context.close() does not emit "close" event
- How to make a durable named queue?
- [SOLVED] Cant connect to remote host HOT 1
- Identifying the Queue name HOT 2
- Queue durability, exclusivity and consumerTag HOT 1
- Allow control over exchange creation HOT 4
- How to get the contents of header?
- bump amqp.node version to 0.4.4 (Node 4.x) HOT 1
- rabbit.js within AngularJS HOT 6
- How best to implement distributed semaphores? HOT 3
- Running REQ/REP as an RPC
- Advantage of using over plain AMQPLIB HOT 1
- Connect callback not optional
- List queues?
- message in queue impact by another message
- How to set queue x-max-length parameter HOT 3
- example error HOT 1
- Prefetch option can only be set through setsockopt and not as part of socket argument.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rabbit.js.