- Turn into module with exports for node
- Rename symbol declarations for no reason at all
- Minor performance tweek by prototyping routing key patterns
- Stop building node 12
- Lint some
- Message functions
ack
,nack
, andreject
, if deconstructed, must be called with call or apply since they are no longer bound to instance. Sacrificed in the name of performance, sorry about that - Internal Message function
consume
is renamed to_consume
- Internal and/or undocumented functions are renamed and decorated with underscore, some where even - highly unnecessary - Symbols
exchange.bind
renamed toexchange.bindQueue
to mitigate JavaScript confusion- consequentely the
exchange.unbind
function is renamed toexchange.unbindQueue
broker.cancel(consumerTag)
signature changed tobroker.cancel(consumerTag[, requeue = true])
. This breaks current behaviour for ack consumers, i.e. messages waiting for ack will be requeued by default if the consumer is cancelled. For some reason they were requeued in the previous version, even though nackAll was called? For no-ack consumers this won't have an affect at all
*.get()
returnsfalse
if no message was retrieved
- Fix inconsistent cancel consumer behaviour between broker, queue, and consumer
- minor, probably futile, tweaks
- give a hint of which Queue throws circular JSON when getting state
- no side effects
Slimmer state
- Add argument to
getState
that tells the broker to only return stuff that actually has content, i.e. messages and undelivered exchange messages
Attempt to tweak performance by removing stuff. Consequently some things broke.
- Remove support for node 10 (mochas fault)
- Message property
consumerTag
is removed, can be found bymessage.fields.consumerTag
- Message property
messageId
is removed, can be found bymessage.properties.messageId
- Remove
onMessageQueued
argument fromqueue.queueMessage
function - Remove
queue.dequeueMessage(message)
function - Change routing key pattern hash (#) handling to
/.*?/
from/.+?/
- Fix pattern matching bug if more than one wildcard
For performance reasons the Broker has been prototyped. Thank you @roberto-naharro and co for discovering and resolving this (#5). This means that functions cannot be deconstructed and called without binding or using call/apply.
Slimmer and swifter state.
getState
: Only use JSON-fns when really necessary (= messages)- Stop dead lettering messages when queue is deleted. Did some deep forrest coverage hunting and found no scenario when this has ever worked, maybe since it isn't part of RabbitMQ behaviour
Coverage hunting.
- Stop consumers when queue is stopped
- Remove setter for message consumerTag
- Sometimes you need the name of the event, especially if you listen with wildcards. The name is an exact match of the emitted message routing key.
Confirm messages and node 10 and above.
- Drop nodejs 8 support, or at least for tests due to mocha
- New message confirm option, will emit
message.nack
,message.ack
, ormessage.undelivered
on broker - Support offing broker events by consumerTag
- Support offing exchange events by consumerTag
- Add broker function
getConsumers()
to get the list of consumer properties
- Ignore published message if no one is listening, unless it is mandatory
- Support changing destination exchange key in shovel
- Support overwriting shoveled message properties
- Support passing source binding priority to shovel or bound exchange
createShovel
has changed signature: last argumentcloneMessage
is converted to anargs
object, andcloneMessage
moved to a property ofargs
- Introduce e2e by
bindExchange
and consequentalyunbindExchange
, shoveling messages between exchanges
- Fix consumer eventlistener not working at all due to messed up binary code
- Close shovel if source consumer is closed
- Introduce shovel, shoveling messages between brokers
- Support message expiration and queue
messageTtl
- Acked messages were sent to dead letter exchange, they shouldn't, and are not anymore
- Add ability to reset everything, i.e. queues, exchanges, consumers you name it
- Support turning off queue event listener -
queue.off(eventName, handler)
subscribeOnce
also takes priority option, as it should've from the beginning
- Support turning off event listener with
off(eventName, handler)
- Non-persistent message, message option
persistent = false
, will not be recovered when recovering from state
- A recovered queue with messages always considers messages redelivered, regardless if queue was stopped or not
- Export
getRoutingKeyPattern
- Expose broker owner
sendToQueue
has changed signature: argumentroutingKey
is omitted, since it had nothing to do there anyhow- Message in message callback has changed:
- introduced new property named
fields
.routingKey
is moved tofields.routingKey
along with new and freshexchange
andconsumerTag
properties.options
is renamed to.properties
- introduced new property named