Objects>Queue
Caravan Business Server>Help>Objects>Queue |
Syntax
|
Create an instance of the queue object for adding a new event. Queue <queue name>(<queue type>)
Open an instance of the queue. Queue <queue name>(<queue type>,<queue subtype>)
|
Text
|
Purpose: Accessing Queues It is the representation of the queue in caravan object model. The queue is implemented as a table in the caravan database, but its properties differ from standard behavior of a table object. A type name and a subtype distinguish each entry in the queue. Specifying the type alone can access the queue or a combination of type and subtype.
Related: Mail Handling, Outgoing Mail, Database Replication, Data communications
Description: Caravan provides a powerful and well-defined way of creating and handling events. Caravan events are handled in a prioritized first in first out (FIFO) scheme. Caravan provides ways to create user defined events and a mechanism to handle them parallelly.
When a remote user uploads a file into caravan using `ftp~ caravan will trigger a specific event Handler which can take anappropriate action. Event handlers are written using normal caravan script that needs to be registered at startup to handle specific types of events. All event handlers run in separate threads and are optimized to use minimum of resources.
The idea of caravan events can be better understood if we think of events as queues containing messages for different users. Messages of different types need to be handled separately.
We can do it using separate queues or in a single queue for all people. Ifthese messages are to be sent over parallel paths then it makes sense to handle them in separate threads so that some resources will not remain idle while we are servicing other users. Though there is usually a single procedure for handling the events of same type there is sometimes a need to do it parallelly.
Caravan provides a mechanism to write a single procedure to handle multiple destinations. The specific caravan types that are used are `queue~ and `eventhandler~.
|
Properties
|
Item (Read and Write)
QueueId(Read)
|
Back
|
|