Skip to content

Commit

Permalink
re-add directPublish after remove because of no tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sleipi committed Jul 5, 2022
1 parent b46bf65 commit 9e70da3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Transport/Amqp/AmqpTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,18 @@ public function publish(AmqpTransportableMessage $message, int $delay = 0): void
);
}

public function directPublish(AMQPMessage $message): void
{
$this->connect();
$routingKey = self::MESSAGE_QUEUE_PREFIX . $message->getRoutingKey();
$this->declareQueue($routingKey);
$this->channel->basic_publish(
msg: $message,
routing_key: $routingKey
);
}


/**
* @param SubscriptionSettings $subscriptionOptions
* @param Closure $handler
Expand Down

0 comments on commit 9e70da3

Please sign in to comment.