Skip to content

Commit

Permalink
Merge pull request #567 from rosamarsky/fix-kafka-consuming
Browse files Browse the repository at this point in the history
[rdkafka] Use default queue as router topic
  • Loading branch information
makasim authored Oct 18, 2018
2 parents 607780b + 348e9e4 commit 0fd466c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
13 changes: 2 additions & 11 deletions pkg/enqueue/Client/Driver/RdKafkaDriver.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

declare(strict_types=1);

namespace Enqueue\Client\Driver;

use Enqueue\RdKafka\RdKafkaContext;
use Enqueue\RdKafka\RdKafkaTopic;
use Interop\Queue\Destination;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;

Expand Down Expand Up @@ -44,14 +45,4 @@ public function setupBroker(LoggerInterface $logger = null): void
$this->getContext()->createConsumer($queue);
}
}

/**
* @return RdKafkaTopic
*/
protected function createRouterTopic(): Destination
{
return $this->doCreateTopic(
$this->createTransportRouterTopicName($this->getConfig()->getRouterTopic(), true)
);
}
}
2 changes: 2 additions & 0 deletions pkg/enqueue/Client/Driver/RedisDriver.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Enqueue\Client\Driver;

use Enqueue\Redis\RedisContext;
Expand Down
5 changes: 0 additions & 5 deletions pkg/enqueue/Tests/Client/Driver/RdKafkaDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,6 @@ protected function createMessage(): InteropMessage
return new RdKafkaMessage();
}

protected function getRouterTransportName(): string
{
return 'aprefix.router';
}

/**
* @return Config
*/
Expand Down

0 comments on commit 0fd466c

Please sign in to comment.