| 1 | export const KAFKA_BROKER = process.env.KAFKA_BROKER ?? 'localhost:9093'; |
| 2 | export const KAFKA_CLIENT_ID = 'eventflowapp'; |
| 3 | export const KAFKA_CONSUMER_GROUP = 'eventflowapp-consumer'; |
| 4 | |
| 5 | //Kafka Topics |
| 6 | export const KAFKA_TOPICS = { |
| 7 | //Auth events |
| 8 | USER_REGISTERED: 'user.registered', |
| 9 | USER_LOGIN: 'user.login', |
| 10 | PASSWORD_RESET_REQUESTED: 'user.password-reset-requested', |
| 11 | |
| 12 | //Event events |
| 13 | EVENT_CREATED: 'event.created', |
| 14 | EVENT_UPDATED: 'event.updated', |
| 15 | EVENT_CANCELLED: 'event.cancelled', |
| 16 | |
| 17 | // Ticket events |
| 18 | TICKET_PURCHASED: 'ticket.purchased', |
| 19 | TICKET_CANCELLED: 'ticket.cancelled', |
| 20 | TICKET_CHECKED_IN: 'ticket.checked-in', |
| 21 | |
| 22 | // Payment events |
| 23 | PAYMENT_COMPLETED: 'payment.completed', |
| 24 | PAYMENT_FAILED: 'payment.failed', |
| 25 | PAYMENT_REFUNDED: 'payment.refunded', |
| 26 | |
| 27 | // Noticiation triggers |
| 28 | SEND_EMAIL: 'notification.send-email', |
| 29 | SEND_PUSH: 'notification.send-push', |
| 30 | } as const; |
| 31 | |
| 32 | export type KafkaTopics = (typeof KAFKA_TOPICS)[keyof typeof KAFKA_TOPICS]; |