
Akram
Zaitout
Software Engineer
Software Engineer and Data Scientist with over five years of hands-on experience building scalable web platforms. I combine deep frontend and backend expertise with AI-driven problem solving to deliver production-ready architectures that transform complex ideas into high-performance digital solutions.
01
import { EventsHandler, IEventHandler } from '@nestjs/cqrs';
02
import { ClientKafka } from '@nestjs/microservices';
03
import { VisitorArrivedEvent } from './events';
04
@EventsHandler(VisitorArrivedEvent)
05
export class VisitorArrivedHandler
06
implements IEventHandler<VisitorArrivedEvent> {
07
constructor(
08
@Inject('KAFKA_SERVICE')
09
private readonly kafka: ClientKafka,
10
) {}
11
async handle(
12
event: VisitorArrivedEvent,
13
): Promise<void> {
14
this.kafka.emit(
15
'portfolio.visitor.arrived',
16
event.payload,
17
);
18
}
19
}