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

Producer queue #54

Merged
merged 4 commits into from Oct 12, 2012
Merged

Producer queue #54

merged 4 commits into from Oct 12, 2012

Conversation

mvrhov
Copy link
Contributor

@mvrhov mvrhov commented Jun 28, 2012

Queue can optionally be defined from the producer
Fixes #43

@@ -22,6 +22,15 @@ public function exchangeDeclare()
$this->exchangeOptions['internal']);

$this->declared = true;

if (('' != $this->queueOptions['name']) && (null !== $this->queueOptions['name'])) {
Copy link
Collaborator

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?

Copy link
Collaborator

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.

Copy link
Contributor Author

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?

@videlalvaro
Copy link
Collaborator

Any news on this PR?

@mvrhov
Copy link
Contributor Author

mvrhov commented Jul 16, 2012

Sorry, have been on vacation.

@mvrhov
Copy link
Contributor Author

mvrhov commented Aug 1, 2012

Ia have this in production and except the problem I fixed about an hour ago this seems to work. Any ETA on merging this?

@chEbba
Copy link

chEbba commented Aug 17, 2012

Any news here?

@mvrhov
Copy link
Contributor Author

mvrhov commented Oct 12, 2012

@videlalvaro do you need anything else from me before this gets merged?

videlalvaro added a commit that referenced this pull request Oct 12, 2012
@videlalvaro videlalvaro merged commit b475469 into php-amqplib:master Oct 12, 2012
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.

Producers Not Declaring Queue
3 participants