Skip to content

Commit

Permalink
Add setting subscription attributes to Sns and SnsQs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmy committed Feb 13, 2023
1 parent 2278fce commit ebd34b8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions SnsQsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,17 @@ public function close(): void
$this->getSqsContext()->close();
}

public function setSubscriptionAttributes(SnsQsTopic $topic, SnsQsQueue $queue, array $attributes): void
{
$this->getSnsContext()->setSubscriptionAttributes(new SnsSubscribe(
$topic,
$this->getSqsContext()->getQueueArn($queue),
SnsSubscribe::PROTOCOL_SQS,
false,
$attributes,
));
}

private function getSnsContext(): SnsContext
{
if (null === $this->snsContext) {
Expand Down

0 comments on commit ebd34b8

Please sign in to comment.