Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

replyTo not being passed in publish #31

Open
aujamo44 opened this issue Jul 25, 2023 · 1 comment
Open

replyTo not being passed in publish #31

aujamo44 opened this issue Jul 25, 2023 · 1 comment

Comments

@aujamo44
Copy link

When calling amqp.publish() I am receiving an error from RabbitMQ that my message is missing the reply_to property.
Here is what I have as my publisher:

const publish = function () {
    amqp.publish({
      queue_name: queueName,
      body: myBody,
      replyTo: myReplyQueue,
      messageId: uniqueID,
      correlationId: uniqueID,
      content_type: "text/plain",
    });
  };

publish()

I have also tried passing the publish option as reply_to and ReplyTo but to no avail 🥲

@javaducky
Copy link
Contributor

Hello @aujamo44! I'm not able to reproduce your issue with the latest source.

When providing as replyTo, the value is not published. I noticed that your messageId and correlationId would have the same issue as replyTo.

Please try again with the latest code and use the following:

const publish = function () {
    amqp.publish({
      queue_name: queueName,
      body: myBody,
      reply_to: myReplyQueue,
      message_id: uniqueID,
      correlation_id: uniqueID,
      content_type: "text/plain",
    });
  };

publish()

Please let me know your results!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants