team-supercharge / nest-amqp

Nest AMQP 1.0 module - NPM package: https://www.npmjs.com/package/@team-supercharge/nest-amqp
https://supercharge.io
MIT License
26 stars 13 forks source link

Is it possible to delete a queue ? #66

Closed bacloud22 closed 1 year ago

bacloud22 commented 1 year ago

I have a topic with a single message scheduled for delivery each X minutes.

This message I send once the app bootstraps as a kind of scheduler:

send(
 'queue://', 
  { data: {} },
  {
    schedule: {
      cron: `*/5 * * * *`,
    },
  }
);

I want to be able to delete the queue before creation. (recreate, before sending the first message).

Thanks a lot

amangeot commented 1 year ago

Hello, how did you achieve it?

bacloud22 commented 1 year ago

It looks like you cannot manage Topics: https://stackoverflow.com/a/76623222/22076972

raschan commented 1 year ago

Worth noting, that if on a queue there is no activity (no active consumers or no pending messages), the broker itself will delete that queue (I think after 10 minutes by default, but don't quote me on that).