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

Dead lettering support #15

Merged
merged 42 commits into from
Jan 16, 2017
Merged

Dead lettering support #15

merged 42 commits into from
Jan 16, 2017

Conversation

KinaneD
Copy link
Member

@KinaneD KinaneD commented Jan 11, 2017

resolves #6
resolves #7
resolves #8
resolves #9
resolves #10
resolves #13
resolves #14
resolves #16
resolves #17

@KinaneD KinaneD requested review from Mulkave and alisissa January 11, 2017 15:44
@KinaneD KinaneD self-assigned this Jan 11, 2017
* @param bool $passive
* @param bool $durable
* @param bool $autoDelete
* @param int $deliveryMode
*/
public function __construct(Connection $connection, $exchangeName, $exchangeType = 'fanout', $passive = false, $durable = true, $autoDelete = false, $deliveryMode = 2)
public function __construct(Connection $connection, $queueName, $exchangeName, $exchangeType = 'fanout', $bindingKeys = [null], $passive = false, $durable = true, $autoDelete = false, $deliveryMode = 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$bindingKeys = [null] better be empty array, and do the check later

$deliveryMode = (int) $this->option('deliveryMode');

// Dead Lettering
$deadLetterQueueName = ($qName = $this->option('deadLetterQueueName')) ? $qName : (($xName = $this->option('deadLetterExchangeName')) ? $xName : null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename the var $xName

*/
private function compileArguments($deadLetterExchangeName, $deadLetterRoutingKey, $messageTtl)
{
$this->arguments['x-dead-letter-exchange'] = ['S', $deadLetterExchangeName];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add comment to explain the 'S' argument

$this->Arguments['x-dead-letter-routing-key'] = ['S', $deadLetterRoutingKey];
}

if($messageTtl) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$messageTTL

@KinaneD
Copy link
Member Author

KinaneD commented Jan 12, 2017

As the implementation is currently, if a user intend to use dead lettering and a exception is thrown once the app exchange/queue are declared for what ever reason (e.g. config/params mismatch), the dlx queue and exchange will be created a priori. I am afraid this might lead to dangling queues and exchanges.

None the less, these anomalies can be addressed in the management ui.

So that both the producer and consumer can take advantage of.
So we can get the producer/consumer exchange/queue declaration  and
other params
@KinaneD
Copy link
Member Author

KinaneD commented Jan 12, 2017

@Aliissa @Mulkave Some changes has been added, pelase review again.

@KinaneD
Copy link
Member Author

KinaneD commented Jan 13, 2017

@Mulkave @Aliissa Should i merge?
Producer apps should now register the BowlerServiceProvider though!

@KinaneD KinaneD merged commit 44e611c into master Jan 16, 2017
@Mulkave Mulkave deleted the dead-lettering-support branch February 19, 2019 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants