Skip to content

Commit 1db502a

Browse files
committed
Merge pull request #251 from agiuliano/master
add ProducerInterface
2 parents 6f7e60d + 94437af commit 1db502a

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

RabbitMq/Fallback.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace OldSound\RabbitMqBundle\RabbitMq;
44

5-
class Fallback
5+
class Fallback implements ProducerInterface
66
{
7-
public function publish()
7+
public function publish($msgBody, $routingKey = '', $additionalProperties = array())
88
{
99
return false;
1010
}

RabbitMq/Producer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* Prodcuer, that publishes AMQP Messages
1010
*/
11-
class Producer extends BaseAmqp
11+
class Producer extends BaseAmqp implements ProducerInterface
1212
{
1313
protected $contentType = 'text/plain';
1414
protected $deliveryMode = 2;

RabbitMq/ProducerInterface.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace OldSound\RabbitMqBundle\RabbitMq;
4+
5+
interface ProducerInterface
6+
{
7+
/**
8+
* Publish a message
9+
*
10+
* @param string $msgBody
11+
* @param string $routingKey
12+
* @param array $additionalProperties
13+
*/
14+
public function publish($msgBody, $routingKey = '', $additionalProperties = array());
15+
}

0 commit comments

Comments
 (0)