Giter Club home page Giter Club logo

amqplib-auto-recovery's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

amqplib-auto-recovery's Issues

Broken

I believe this shouldn't be happening with auto recovery, when we run our program and rabbitmq is not up we get this issue with auto recovery

AMQP error Error: Channel ended, no reply will be forthcoming
    at rej (/Users/localadmin/workspace/nautilus-js/node_modules/amqplib/lib/channel.js:190:7)
    at Channel.C._rejectPending (/Users/localadmin/workspace/nautilus-js/node_modules/amqplib/lib/channel.js:196:42)
    at Channel.C.toClosed (/Users/localadmin/workspace/nautilus-js/node_modules/amqplib/lib/channel.js:160:8)
    at Channel.C.accept (/Users/localadmin/workspace/nautilus-js/node_modules/amqplib/lib/channel.js:411:10)
    at Connection.mainAccept [as accept] (/Users/localadmin/workspace/nautilus-js/node_modules/amqplib/lib/connection.js:63:33)
    at Socket.go (/Users/localadmin/workspace/nautilus-js/node_modules/amqplib/lib/connection.js:476:48)
    at emitNone (events.js:86:13)
    at Socket.emit (events.js:185:7)
    at emitReadable_ (_stream_readable.js:433:10)
    at emitReadable (_stream_readable.js:427:7)
    at readableAddChunk (_stream_readable.js:188:13)
    at Socket.Readable.push (_stream_readable.js:135:10)
    at TCP.onread (net.js:542:20)```

failure to call connect callback

I have been trying to to use this library to open a confirm channel on Node 6.9.1 against RabbitMQ. It seems that the invocation of my channel callback (#L86 in this library) is failing to run. Stepping through with the debugger I get right to line 86 and step into but nothing happens. I have a breakpoint at the first line of the callback and it does not get hit.

Have you ever seen something like this? Thoughts on what could be wrong?

Implementing with ampqlib (without /callback_api)

Here is my amqp implementation with RPC pattern,

var amqp = require('amqplib');
var uuid = require('uuid-v4');

var url = 'amqp://localhost';
var rpc_queue = 'rpc_queue';

const REPLY_QUEUE = 'amq.rabbitmq.reply-to';
 
const createClient = () => amqp.connect(url)
  .then((conn) => conn.createChannel())
  .then((channel) => {
    console.log('channel created');
    // create an event emitter where rpc responses will be published by correlationId
    channel.responseEmitter = new EventEmitter();
    channel.responseEmitter.setMaxListeners(0);
    channel.consume(REPLY_QUEUE,
      (msg) => channel.responseEmitter.emit(msg.properties.correlationId, msg.content),
      {noAck: true});
 
    return channel;
  });

async function test() {
 var channel = await createClient();
};

test();

I am getting following errors

 '(node:15384) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'then' of undefined' 
and
 if (err === null) cb(null, new CallbackModel(c));
                      ^
TypeError: cb is not a function

Please help me in getting my code working with your library .

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.