File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/api/integrations/event/sqs Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -118,21 +118,21 @@ export class SqsController extends EventController implements EventControllerInt
118118 }
119119
120120 if ( Array . isArray ( sqsEvents ) && sqsEvents . includes ( we ) ) {
121+ const serverName = sqsConfig . GLOBAL_ENABLED ? configService . get < HttpServer > ( 'SERVER' ) . NAME : 'evolution' ;
121122 const prefixName = sqsConfig . GLOBAL_ENABLED ? sqsConfig . GLOBAL_PREFIX_NAME : instanceName ;
122123 const eventFormatted =
123124 sqsConfig . GLOBAL_ENABLED && sqsConfig . GLOBAL_FORCE_SINGLE_QUEUE
124125 ? 'singlequeue'
125126 : `${ event . replace ( '.' , '_' ) . toLowerCase ( ) } ` ;
126127 const queueName = `${ prefixName } _${ eventFormatted } .fifo` ;
127-
128128 const sqsUrl = `https://sqs.${ sqsConfig . REGION } .amazonaws.com/${ sqsConfig . ACCOUNT_ID } /${ queueName } ` ;
129129
130130 const message = {
131131 event,
132132 instance : instanceName ,
133133 dataType : 'json' ,
134134 data,
135- server : configService . get < HttpServer > ( 'SERVER' ) . NAME ,
135+ server : serverName ,
136136 server_url : serverUrl ,
137137 date_time : dateTime ,
138138 sender,
@@ -166,7 +166,7 @@ export class SqsController extends EventController implements EventControllerInt
166166 const isGlobalEnabled = configService . get < Sqs > ( 'SQS' ) . GLOBAL_ENABLED ;
167167 const params = {
168168 MessageBody : JSON . stringify ( message ) ,
169- MessageGroupId : 'evolution' ,
169+ MessageGroupId : serverName ,
170170 QueueUrl : sqsUrl ,
171171 ...( ! isGlobalEnabled && {
172172 MessageDeduplicationId : `${ instanceName } _${ eventFormatted } _${ Date . now ( ) } ` ,
You can’t perform that action at this time.
0 commit comments