Class: stompit.ChannelPool


new stompit.ChannelPool(connectFailover, [options])

Options:

channelPool.channel(callback)

Request an unused channel and pass it as an argument to the supplied callback function.

When a channel emits an idle event the pool either closes the channel or reuses it in another channel request. The idle event is emitted when all send and subscribe operations are completed. Be aware, for example that if after the first message is sent and there are no other operations running (i.e. sending messages or subscriptions open) then the channel emits an idle event.

Example

channelPool.channel(function(error, channel) {

});