Skip to content

Instantly share code, notes, and snippets.

View Vasary's full-sized avatar
🎱
In relocation process

Viktor Vasary Vasary

🎱
In relocation process
  • Hong kong
View GitHub Profile
@Vasary
Vasary / Flow
Created January 23, 2022 11:58
sequenceDiagram
RabbitMQ->>+Consumer: 10 messages
Consumer->>+Handler: start handle first mesage
Handler->>+Bank: withdrow money
Handler->>+Consumer: ack mesage
Consumer->>+Handler: start handle second mesage
Handler->>+Bank: withdrow money
Handler->>+Consumer: ack mesage
Consumer->>+Handler: start handle third mesage
@Vasary
Vasary / php
Created January 23, 2022 10:50
<?php
public function consume(ConsumerInterface $consumer, AbstractQueueName $queueName): void
{
$consumerIdentified = (string)Uuid::uuid4();
$this->channel->qos(0, 10, false);
$this->channel->consume(
fn(Message $message) => $this->handle($message, $consumer),
$queueName,
<?php
namespace Infrastructure\Generator;
use Domain\Generator\TraceIdGeneratorInterface;
use Domain\GUIDGenerator\GUIDGeneratorInterface;
final class TraceIdProvider implements TraceIdGeneratorInterface
{
private $generator;
git config --global alias.tree "log --graph --abbrev-commit --decorate --format=format:'%C(dim white)%h%C(reset) - %C(green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(yellow)%d%C(reset)' --all"