Permalink
Browse files

add ProducerInterface

  • Loading branch information...
agiuliano committed Mar 26, 2015
1 parent 6f7e60d commit 94437af52ddadcb217365af3ad04266ba4d3f212
Showing with 18 additions and 3 deletions.
  1. +2 −2 RabbitMq/Fallback.php
  2. +1 −1 RabbitMq/Producer.php
  3. +15 −0 RabbitMq/ProducerInterface.php
View
@@ -2,9 +2,9 @@
namespace OldSound\RabbitMqBundle\RabbitMq;
class Fallback
class Fallback implements ProducerInterface
{
public function publish()
public function publish($msgBody, $routingKey = '', $additionalProperties = array())
{
return false;
}
View
@@ -8,7 +8,7 @@
/**
* Prodcuer, that publishes AMQP Messages
*/
class Producer extends BaseAmqp
class Producer extends BaseAmqp implements ProducerInterface
{
protected $contentType = 'text/plain';
protected $deliveryMode = 2;
@@ -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.