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
Producer queue #54
Producer queue #54
Conversation
@@ -22,6 +22,15 @@ public function exchangeDeclare() | |||
$this->exchangeOptions['internal']); | |||
|
|||
$this->declared = true; | |||
|
|||
if (('' != $this->queueOptions['name']) && (null !== $this->queueOptions['name'])) { |
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.
why you don't allow to declare queues with an empty name?
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.
Also this code is declaring a queue, so it doesn't belong inside the exchangeDeclare method. So it needs it's own queue declare method. Also the exchange declare method uses a flag called "declare" to avoid doing that call for every message publish call. That means your code must use a flag as well to prevent declaring the queue every time (else publishing messages will become very very slow and introduce a regression).
So in that case "declare" must be split in two variables. One called perhaps "exchange_declared" and the other "queue_declared" or something like that.
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.
The empty name.. I thought that wasn't possible.
As the code declaring queue. Shouldn't the if from publish method really be moved into the exchangeDeclare method?
Any news on this PR? |
Sorry, have been on vacation. |
Ia have this in production and except the problem I fixed about an hour ago this seems to work. Any ETA on merging this? |
Any news here? |
@videlalvaro do you need anything else from me before this gets merged? |
Queue can optionally be defined from the producer
Fixes #43