TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

Functions
Message Queue (Dispatcher)
Function Categories

## Functions
Boolean | dispatchMessage (queueName, event, data)
Boolean | dispatchMessageObject (queueName, message)
Boolean | isQueueRegistered (queueName)
Boolean | registerMessageListener (queueName, listener)
void | registerMessageQueue (queueName)
void | unregisterMessageListener (queueName, listener)
void | unregisterMessageQueue (queueName)

## Detailed Description

## Function Documentation

Boolean dispatchMessage | ( | queueName | ,
|  | event | ,
|  | data |
| ) |  |

Dispatches a message to given message queue

Parameters

  queueName | The queue to dispatch to
  event | The message you are passing
  data | Data

Returns
  Returns true on success and false otherwise

Boolean dispatchMessageObject | ( | queueName | ,
|  | message |
| ) |  |

Dispatches a message object to the given queue

Parameters

  queueName | The name of the queue to dispatch object to
  message | The message object

Boolean isQueueRegistered | ( | queueName |  | ) |

Checks whether message queue is registered

Parameters

  queueName | The name of the queue to check

Returns
  Returns true if registered and false if not

Boolean registerMessageListener | ( | queueName | ,
|  | listener |
| ) |  |

Registers a message listener on a message queue

Parameters

  queueName | The name of the message queue
  listener | The name of the listener to register

Returns
  Returns true on success, and false otherwise (probably not found)

void registerMessageQueue | ( | queueName |  | ) |

Registers given message queue

Parameters

  queueName | The name of the message queue

Returns
  No Return Value

void unregisterMessageListener | ( | queueName | ,
|  | listener |
| ) |  |

Unregisters the message listener on given message queue

Parameters

  queueName | The name of the message queue
  listener | The name of the listener to unregister

Returns
  No Return Value

void unregisterMessageQueue | ( | queueName |  | ) |

Unregisters given message queue

Parameters

  The | name of the message queue

Returns
  No Return Value