You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like the way assertQueue returns an object that has the queue name on it.
ch.assertQueue('whatever').then(function(q){q.queue;// the queue name: whatever});
Can we get the assertExchange to do the same? Right now, it only seems to return an empty JS object. It would be very helpful for the code I'm writing to have the exchange name returned in the same way, so that I don't have to create a string var in so many places.
The text was updated successfully, but these errors were encountered:
The reply in the protocol (ExchangeDeclareOk) doesn't actually contain the exchange name (whereas QueueDeclareOk has 'queue' because it may be a name generated by the server); and 2. I didn't think about it a whole lot, and for most things I just return whatever the server sends.
Oh, ha, actually I say in the documentation that the server's reply contains the exchange name.
Opinions differ on this, apparently, even within the specification. In older versions of AMQP, you could supply an empty string as the name of an exchange to get the server to make one up for you, like you can with queues.
Long story short: the promise returned from #assertExchange now looks like {exchange: "foo"}.
I like the way
assertQueue
returns an object that has the queue name on it.Can we get the
assertExchange
to do the same? Right now, it only seems to return an empty JS object. It would be very helpful for the code I'm writing to have the exchange name returned in the same way, so that I don't have to create a string var in so many places.The text was updated successfully, but these errors were encountered: