Skip to content

Commit 115016a

Browse files
Merge pull request #144 from blockful/dev
Dev
2 parents 92b4ff2 + 64e846b commit 115016a

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

apps/consumers/src/services/ens-resolver.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class EnsResolverService {
1515
chain: mainnet,
1616
transport: http(undefined, {
1717
timeout: 5_000, // 5 seconds timeout
18-
retryCount: 2, // Try 2 times
18+
retryCount: 10, // Try 10 times
1919
retryDelay: 500 // Wait 500ms between retries
2020
})
2121
});

packages/rabbitmq-client/src/connections.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,22 @@ export class RabbitMQConnection {
1212
if (urlObj.hostname === 'localhost') {
1313
urlObj.hostname = '127.0.0.1';
1414
}
15+
urlObj.searchParams.set('heartbeat', '30');
1516

1617
this.url = urlObj.toString();
1718
}
1819

1920
async connect(): Promise<void> {
2021
if (!this.connection) {
2122
this.connection = new Connection(this.url);
23+
this.connection.on('error', (err) => {
24+
console.error('[RabbitMQ] Connection error:', err.message);
25+
});
26+
27+
this.connection.on('connection', () => {
28+
console.log('[RabbitMQ] Connection (re)established');
29+
});
30+
2231
await this.connection.onConnect(5000);
2332
}
2433
}

packages/rabbitmq-client/src/consumer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class RabbitMQConsumer {
4646
);
4747

4848
this.consumer.on('error', (err) => {
49-
console.error('[RabbitMQConsumer] Consumer error:', err);
49+
console.error(`[RabbitMQConsumer] Consumer error on queue '${this.queueName}':`, err.message);
5050
});
5151

5252
this.isConsuming = true;

packages/rabbitmq-client/src/publisher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class RabbitMQPublisher {
2727

2828
this.publisher = conn.createPublisher({
2929
confirm: true,
30-
maxAttempts: 3,
30+
maxAttempts: 10,
3131
exchanges: []
3232
});
3333
}

0 commit comments

Comments
 (0)