@@ 43-57 (lines=15) @@ | ||
40 | * @param DomainMessage $domainMessage |
|
41 | * @return void |
|
42 | */ |
|
43 | public function handle(DomainMessage $domainMessage) |
|
44 | { |
|
45 | $this->queue->push( |
|
46 | QueueToEventDispatcher::class, |
|
47 | [ |
|
48 | 'uuid' => (string)$domainMessage->getId(), |
|
49 | 'playhead' => $domainMessage->getPlayHead(), |
|
50 | 'metadata' => json_encode($this->serializer->serialize($domainMessage->getMetadata())), |
|
51 | 'payload' => json_encode($this->serializer->serialize($domainMessage->getPayload())), |
|
52 | 'recorded_on' => $domainMessage->getRecordedOn()->format('Y-m-d H:i:s'), |
|
53 | 'type' => $domainMessage->getType(), |
|
54 | ], |
|
55 | $this->config->get('cqrses.queue_name', 'default') |
|
56 | ); |
|
57 | } |
|
58 | } |
@@ 53-68 (lines=16) @@ | ||
50 | * @param DomainMessage $domainMessage |
|
51 | * @return void |
|
52 | */ |
|
53 | public function handle(DomainMessage $domainMessage) |
|
54 | { |
|
55 | $this->queue->push( |
|
56 | QueueToEventDispatcherWithCommandId::class, |
|
57 | [ |
|
58 | 'uuid' => (string)$domainMessage->getId(), |
|
59 | 'playhead' => $domainMessage->getPlayHead(), |
|
60 | 'metadata' => json_encode($this->serializer->serialize($domainMessage->getMetadata())), |
|
61 | 'payload' => json_encode($this->serializer->serialize($domainMessage->getPayload())), |
|
62 | 'recorded_on' => (string)$domainMessage->getRecordedOn(), |
|
63 | 'type' => $domainMessage->getType(), |
|
64 | 'command_id' => $this->notificationsCommandBus->getLastCommandId(), |
|
65 | ], |
|
66 | $this->config->get('cqrses.queue_name', 'default') |
|
67 | ); |
|
68 | } |
|
69 | } |
|
70 |