Skip to content

Commit

Permalink
Testnet (#4264)
Browse files Browse the repository at this point in the history
* feat: do not cache the sdks to make it possible to have different client configs in one runtime

* put back yarn release and yarnrc

* v2.0.3: stable version release

* v2.0.3-alpha.1 alpha release

* v2.0.4-alpha.1 alpha release
fix: release version

* v2.0.4-alpha.2 alpha release

* Add ERD for reference

* WIP: sdk-server

* fix: handle empty chainData cases.

* Update fastpath.ts

* rmv: mnemonic (#4230)

* remove mnemonic

* increase timeouts (#4226)

* Sequencer cache persists (#4245)

* feat: add expiry time for executor cache

* fix test

* Batch pulling from the rabbitmq using amqplib  (#4216)

* feat: pull data from the queue in batch

* revert

* feat: move executor params to config

* fix: integration config

* rm

* fix: test

* Lint

* ci(test): no need to include it

* fix: queue limit setup

---------

Co-authored-by: kristohberg <kristoffer.hovland.berg@gmail.com>
Co-authored-by: sanchaymittal <sanchaymittal@gmail.com>
Co-authored-by: just-a-node <eye1717@gmail.com>
Co-authored-by: carlomazzaferro <carlo.mazzaferro@gmail.com>
Co-authored-by: wanglonghong <wanglonghong4467@gmail.com>
  • Loading branch information
6 people authored May 17, 2023
1 parent 978f06d commit a5a3484
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/agents/sequencer/src/sequencer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,16 @@ export const makeSubscriber = async () => {
);

if (context.config.messageQueue.subscriber) {
await channel.assertQueue(context.config.messageQueue.subscriber, { durable: true });
const binding = context.config.messageQueue.bindings.find(
(it) => it.target == context.config.messageQueue.subscriber,
);
if (binding) {
const queue = context.config.messageQueue.queues.find((it) => it.name == context.config.messageQueue.subscriber);

if (binding && queue) {
await channel.assertQueue(context.config.messageQueue.subscriber, {
durable: true,
maxLength: queue.queueLimit,
});
await channel.bindQueue(context.config.messageQueue.subscriber, binding?.exchange, binding?.keys[0]);
}

Expand All @@ -108,7 +113,8 @@ export const makeSubscriber = async () => {
// By default subscribe to all configured queues concurrently
await Promise.all(
context.config.messageQueue.bindings.map(async (binding) => {
await channel.assertQueue(binding.target, { durable: true });
const queue = context.config.messageQueue.queues.find((it) => it.name == binding.target);
await channel.assertQueue(binding.target, { durable: true, maxLength: queue?.queueLimit });
await channel.bindQueue(binding.target, binding.exchange, binding.keys[0]);
}),
);
Expand Down

0 comments on commit a5a3484

Please sign in to comment.