Skip to content

AKrasnyatov/hw19#123

Open
AleksandKrasnyatov wants to merge 14 commits into
mainfrom
AKrasnyatov/hw19
Open

AKrasnyatov/hw19#123
AleksandKrasnyatov wants to merge 14 commits into
mainfrom
AKrasnyatov/hw19

Conversation

@AleksandKrasnyatov

Copy link
Copy Markdown

No description provided.

Comment thread .gitignore Outdated
Comment thread src/Domain/ValueObject/TelegramChatId.php Outdated
Comment thread src/Domain/ValueObject/TelegramChatId.php Outdated
$command = new SendNotificationCommand(...$payload);
$this->handler->handle($command);

$message->ack();

@coders-lair-dev coders-lair-dev Jun 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Для того, чтобы сообщение пошло по retry и дальше в dead dlx - нужно вызвать явно $message->reject(requeue: false);, например, в try/catch. В таком виде оно не будет работать, как задумано. И при reject - нужно использовать заголовок x-death и доработать логику на обработку самих reject'ов

Comment thread web/index.php
try {
$email = new Email($data['email'] ?? '');
$chatId = empty($data['chatId'] ) ? null : new TelegramChatId((int) $data['chatId']);
Producer::create()->publish($email, $chatId);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут передаётся получатель и чат, но не message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants