mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-19 11:52:20 -06:00
Merge pull request #1498 from thrsouza/main
Inclusão do parâmetro frame_max para compatibilidade com RabbitMQ 4.1+
This commit is contained in:
@@ -21,9 +21,21 @@ export class RabbitmqController extends EventController implements EventControll
|
||||
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
const uri = configService.get<Rabbitmq>('RABBITMQ').URI;
|
||||
const frameMax = configService.get<Rabbitmq>('RABBITMQ').FRAME_MAX;
|
||||
const rabbitmqExchangeName = configService.get<Rabbitmq>('RABBITMQ').EXCHANGE_NAME;
|
||||
|
||||
amqp.connect(uri, (error, connection) => {
|
||||
const url = new URL(uri);
|
||||
const connectionOptions = {
|
||||
protocol: url.protocol.slice(0, -1),
|
||||
hostname: url.hostname,
|
||||
port: url.port || 5672,
|
||||
username: url.username || 'guest',
|
||||
password: url.password || 'guest',
|
||||
vhost: url.pathname.slice(1) || '/',
|
||||
frameMax: frameMax
|
||||
};
|
||||
|
||||
amqp.connect(connectionOptions, (error, connection) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user