-
Notifications
You must be signed in to change notification settings - Fork 3
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
v2.3.4, Add support for other exchange types and options #17
base: master
Are you sure you want to change the base?
Conversation
linus
commented
Feb 1, 2018
- behaviour.exchangeType specifies exchange type, default "topic"
- behaviour.exchangeOptions specifies exchange options
- behaviour.exchangeType specifies exchange type, default "topic" - behaviour.exchangeOptions specifies exchange options
@@ -14,6 +14,8 @@ var dummyLogger = { | |||
}; | |||
|
|||
var defaultBehaviour = { | |||
exchangeType: "topic", | |||
exchangeOptions: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have the same functionality for queues, that prop is called "queueArguments". Perhaps we can name this "exchangeArguments" for consistency. ("exchangeOptions" is a better name per se, but I think consistency is more important here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I saw that. Here we actually send in the whole options object though, the reason being that exp-amqp-connection does not use the other options (as opposed to the queue options). I am happy to change this to something like { arguments: behaviour.exchangeArguments }
though, if you prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct, the queue thing is a different case. Better to keep "exchangeOptions" then.
Add examples/docs in readme as well, and also some tests. |
- Publisher (producer) exchange needs to be asserted with type and options just as subscriber (consumer) exchange.
- Fix test for exchange with options - Add test for exchange of different type (fanout)
@norla please have another look at README and tests when convenient. |