fixed queue names issue

This commit is contained in:
Boki 2025-06-23 11:49:13 -04:00
parent a3f2f199b4
commit 71f771862b
5 changed files with 5 additions and 5 deletions

2
.env
View file

@ -5,7 +5,7 @@
# Core Application Settings # Core Application Settings
NODE_ENV=development NODE_ENV=development
LOG_LEVEL=trace LOG_LEVEL=trace
LOG_HIDE_OBJECT=true LOG_HIDE_OBJECT=false
# Data Service Configuration # Data Service Configuration
DATA_SERVICE_PORT=2001 DATA_SERVICE_PORT=2001

View file

@ -89,14 +89,14 @@ export function findServiceForHandler(handlerName: string): string | undefined {
* Get full queue name with service namespace * Get full queue name with service namespace
*/ */
export function getFullQueueName(serviceName: string, handlerName: string): string { export function getFullQueueName(serviceName: string, handlerName: string): string {
return `${serviceName}:${handlerName}`; return `${serviceName}_${handlerName}`;
} }
/** /**
* Parse a full queue name into service and handler * Parse a full queue name into service and handler
*/ */
export function parseQueueName(fullQueueName: string): { service: string; handler: string } | null { export function parseQueueName(fullQueueName: string): { service: string; handler: string } | null {
const parts = fullQueueName.split(':'); const parts = fullQueueName.split('_');
if (parts.length !== 2 || !parts[0] || !parts[1]) { if (parts.length !== 2 || !parts[0] || !parts[1]) {
return null; return null;
} }

View file

@ -212,7 +212,7 @@ export class SmartQueueManager extends QueueManager {
* Resolve a queue name to a route * Resolve a queue name to a route
*/ */
private resolveQueueRoute(queueName: string): QueueRoute | null { private resolveQueueRoute(queueName: string): QueueRoute | null {
// Check if it's a full name (service:handler) // Check if it's a full name (service_handler)
const parsed = parseQueueName(queueName); const parsed = parseQueueName(queueName);
if (parsed) { if (parsed) {
const config = getServiceConfig(parsed.service); const config = getServiceConfig(parsed.service);

View file

@ -175,7 +175,7 @@ export interface SmartQueueConfig extends QueueManagerConfig {
} }
export interface QueueRoute { export interface QueueRoute {
/** Full queue name (e.g., 'data-ingestion:ceo') */ /** Full queue name (e.g., 'data-ingestion_ceo') */
fullName: string; fullName: string;
/** Service that owns this queue */ /** Service that owns this queue */
service: string; service: string;