Skip to content

Commit

Permalink
add ProducerInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
agiuliano committed Mar 26, 2015
1 parent 6f7e60d commit 94437af
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
4 changes: 2 additions & 2 deletions RabbitMq/Fallback.php
Expand Up @@ -2,9 +2,9 @@


namespace OldSound\RabbitMqBundle\RabbitMq; namespace OldSound\RabbitMqBundle\RabbitMq;


class Fallback class Fallback implements ProducerInterface
{ {
public function publish() public function publish($msgBody, $routingKey = '', $additionalProperties = array())
{ {
return false; return false;
} }
Expand Down
2 changes: 1 addition & 1 deletion RabbitMq/Producer.php
Expand Up @@ -8,7 +8,7 @@
/** /**
* Prodcuer, that publishes AMQP Messages * Prodcuer, that publishes AMQP Messages
*/ */
class Producer extends BaseAmqp class Producer extends BaseAmqp implements ProducerInterface
{ {
protected $contentType = 'text/plain'; protected $contentType = 'text/plain';
protected $deliveryMode = 2; protected $deliveryMode = 2;
Expand Down
15 changes: 15 additions & 0 deletions RabbitMq/ProducerInterface.php
@@ -0,0 +1,15 @@
<?php

namespace OldSound\RabbitMqBundle\RabbitMq;

interface ProducerInterface
{
/**
* Publish a message
*
* @param string $msgBody
* @param string $routingKey
* @param array $additionalProperties
*/
public function publish($msgBody, $routingKey = '', $additionalProperties = array());
}

0 comments on commit 94437af

Please sign in to comment.