Git Product home page Git Product logo

Comments (1)

gdaws avatar gdaws commented on July 30, 2024

The stompit library has supported RabbitMQ temp queue destinations since v0.22.0, but I agree with you that the library doesn't appear to support this feature, as the required method to use is undocumented and there's no relevant code example provided.

Automatic subscriptions created by a broker can be registered with the client by calling the Client#setImplicitSubscription method. This method should only be called once for each temporary queue destination you define. Automatic subscriptions cannot be cancelled and exist until the client disconnects.

In your example you would call this alternative subscription method once before or immediately after the first send, like for example:

client.setImplicitSubscription('/temp-queue/test', 'auto', function(error, message) {
    // find and call the reply callback
});

The second argument must have value of 'auto' to match the ack mode set by RabbitMQ.

When sending a request include the reply-to header in your send headers:

client.send({
  'destination': '/queue/test',
  'reply-to': '/temp-queue/test'
});

The stompit library cannot provide a request/response API useful for RPC. The problems of binding a reply callback to a request and how to encode/decode a request id in a message is for the user or another library to solve.

from stompit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.