Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

linus
Copy link
Contributor

@linus 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: {},
Copy link
Contributor

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)

Copy link
Contributor Author

@linus linus Feb 1, 2018

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.

Copy link
Contributor

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.

@norla
Copy link
Contributor

norla commented Feb 1, 2018

Add examples/docs in readme as well, and also some tests.
There is also a line in the readme that says the exchange type is always "topic", remove it plz.

- 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)
@linus
Copy link
Contributor Author

linus commented Feb 2, 2018

@norla please have another look at README and tests when convenient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants