-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support queues other than RabbitMQ #61
Comments
I started a refactor to do just that, which is why there are two bus.js
|
I would be happy to help, but I am just starting to improve my NodeJS skills. Maybe later :) |
@mateodelnorte do you have an idea on how to implement this functionality (decoupling bus from transport)? I mean which refactoring steps are needed to have it I could try to help you. |
Hi @emadb. Happy to have the help! The first step will be modifying https://github.com/mateodelnorte/servicebus/blob/master/bus/index.js#L3 to accept a transport type and creating an implementation for redis (or whatever the provider will be) that will implement the same features that https://github.com/mateodelnorte/servicebus/blob/master/bus/rabbitmq/bus.js implements. The bus() function will then instantiate the appropriate transport and functionality should continue from there. To provide a standard interface to implement, send+listen+publish+subscribe+close from https://github.com/mateodelnorte/servicebus/blob/master/bus/rabbitmq/bus.js should probably all have stubs implemented in https://github.com/mateodelnorte/servicebus/blob/master/bus/bus.js which all providers must implement, else they throw a new Error('bla is not implemented)' error. That should get us to the point where basic functionality works, then we can hack through getting any additional things working like servicebus-retry, etc. Would be happy to help with all of this. |
Ok @mateodelnorte. |
In memory could be performed either by zeromq or a combination of UDP and If what you want to do is unit test your handlers / modules that use
|
I implemented a first implementation of a FakeBus. Most methods throw an error (I just implemented pub-sub for testing). I tried to keep the old tests green and the default implementation is still on Rabbit, I simply added an optional argument on the constructor. |
Are similar modifications needed to work with other AMQP compliant systems, or is this module truly RabbitMQ specific? |
I haven't tried it on any vendors other than rabbitmq. Happy to merge PR's for additional brokers or transports. |
@emadb I responded in your repo, but I'll parrot here. A fake bus isn't beneficial here, as an external mocking framework can provide that - and having a fake bus internal to the servicebus library would only help in mocking out single process scenarios, where sb is most widely used in creating distributed systems. |
Alright, my company has decided to invest its time in ActiveMQ, which supports AMQP as well. I'll have to try it out and I'll let you know what comes up |
@mateodelnorte Yes. I saw your response. I replied here:
|
Hi @archa347 what were your results? I'm guessing we're far too tightly coupled to RabbiqMQ's AMQP specification to be simple plug-and-play. The AMQP standard is, in and of itself, all over the place with vendor implementations being much tighter than the standard. |
@mateodelnorte Foresee any major issues with swapping in this package? https://github.com/markbirbeck/amqp-sqs |
Interesting. I think that wrapper goes half way, and covers send/listen. It looks like for publish/subscribe and fanout you'd need to also implement a wrapper on top of SNS. Search for 'fanout' here: https://aws.amazon.com/sqs/details/. Theoretically, though, I think it could be done. I've started doing some experimental work with making servicebus use a provider model for transports: https://github.com/mateodelnorte/servicebus-rabbitmq I'm still finicking with the best way to separate the required modules into different packages without leaving servicebus, itself, as a mostly empty shell. I think what would be required is making something like servicebus-rabbitmq (or whatever interface it ends up boiling down to) that implements amqp-sqs and a corollary to fanout/topic routing, perhaps being a wrapper around SNS. Something like https://www.npmjs.com/package/aws-sns-publish might help do the trick. |
this is in progress in servicebus org - kafkabus on it's way |
Hi,
Would you consider adding different queues than RabbitMQ ? Is there a way to easily replace RabbitMQ with Kafka, ZeroMQ, etc... ? I am having an issue where I'd like to use servicebus, bus our technology stack may not use RabbitMQ in a long run
The text was updated successfully, but these errors were encountered: