Display Filters

class memoryMessageStore

The memoryMessageStore class deals with:
  • storing the message in memory
  • validating messages
  • bus and channel management (creation, access)
  • providing messages (for bus and/or channel)
  • cleaning outdated messages

Methods

Methods Returns Description
addBus( bus ) void

Parameters:

  • bus <string> the bus to be created
addChannel( bus, channel ) void

Parameters:

  • bus <string> bus on top of which to create the channel
  • channel <string> channel to create
delBus( bus ) void

Parameters:

  • bus <string> bus to be deleted delete the bus the bus MUST exist
delChannel( bus, channel ) void

Parameters:

  • bus <string> bus where the channel to be deleted lies
  • channel <string> channel to be removed. Must exist delete the channel.
getBusMessages( bus, options, callback ) void Retrieve messages from all the channel of a given bus

Parameters:

  • bus <string> bus from which to retrieve messages
  • options <Object> allows to pass a "since" parameter, indicating the id of the last message retrieved before. Method will return new messages published since "since" (unless "since" is too old, in which case it will retrieve all messages in the queue).
  • callback <function> callback method. Will be called as callback(message,error)
getChannelMessages( bus, channel, options, callback ) void Retrieve messages from a given channel

Parameters:

  • bus <string> bus where the channel lies
  • channel <string> channel to retrieve the messages from
  • options <Object> allows to pass a "since" parameter, indicating the id of the last message retrieved before. Method will return new messages published since "since" (unless "since" is too old, in which case it will retrieve all messages in the queue).
  • callback <function> callback method. Will be called as callback(message,error)
newChannelSize( bus, channel, size ) void Change the number of message stored in a channel. If when called, the channel already store more message than , older messages will be swept.

Parameters:

  • bus <string> bus where the channel lies
  • channel <string> channel
  • size <int> number of message to store in the channel
save( bus, channel, message )

Parameters:

  • bus <string> bus where the channel you want to post to lies. Must be a valid bus
  • channel <string> channel where to post the message
  • message <backplane message> backplane message to post. Must be a valid backplane message
    • Returns:

      • null
validate( message ) void

Parameters:

  • message <backplane message> Message to be validated check that message is a proper Backplane message with source, type and payload