Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting AMQ_SCHEDULED_DELAY doesn't work #128

Open
paul-uz opened this issue Jun 8, 2022 · 0 comments
Open

Setting AMQ_SCHEDULED_DELAY doesn't work #128

paul-uz opened this issue Jun 8, 2022 · 0 comments

Comments

@paul-uz
Copy link

paul-uz commented Jun 8, 2022

I'm setting AMQ_SCHEDULED_DELAY in the send headers, setting it to 10 seconds, and schedulerSupport is set to true in the ActiveMQ config.

However, when I send a message to the queue, it is consumed immediately.

I even tried using the Send tool in ActiveMQ dashboard with the delay set, and that also got sent immediately.

My code to send messages:

stompit.connect({
      host: `${process.env.MQ_ID}-1.mq.eu-west-1.amazonaws.com`,
      port: 61614,
      ssl: true,
      connectHeaders: {
        'login': 'xxx',
        'passcode': 'yyy',
      },
    }, (err, client) => {
      let frame = client.send({ destination: 'TestQueue', AMQ_SCHEDULED_DELAY: 20000 });

      frame.write(JSON.stringify({foo: {bar: 'baz'}, bar: ['foo', 'bar', 'baz']}));

      frame.end();

      client.disconnect();
    });
  };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant