Skip to content

Setting AMQ_SCHEDULED_DELAY doesn't work #128

Description

@paul-uz

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();
    });
  };

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions