create


Name

create — create a message type

Synopsis

Supported for RTmon only:

create msg_type name number grammar [delivery_mode default_delivery_mode] 
                                  [delivery_timeout default_delivery_timeout] 
                                  [lb_mode default_lb_mode] 
                                  [priority default_priority] 
                                  [user_prop default_user_prop] 

Description

The create command creates a message type in RTmon. Once a new message type is created, the send command can be used to construct and send messages of that type. The create command is useful for prototyping new user-defined message types.

The message type name (an identifier) and number (an integer) must not already be in use by an existing message type. Message type names that start with an underscore are reserved for internal use by SmartSockets. Message type numbers less than zero are reserved for standard SmartSockets message types. The message type grammar, which describes the layout of the data fields in messages of this type, must be a double-quoted string. For more information on message types, see Message Types. All standard message types (such as CONTROL) are available by default to all SmartSockets processes, including RTmon.

By default, the new message type has a delivery mode of BEST_EFFORT unless it is a JMS message type. JMS message types have a delivery mode of ORDERED by default. The default delivery mode of a message type can be overridden by specifying a delivery mode (options are BEST_EFFORT, ORDERED, SOME, and ALL) for the create command.

By default, the new message type has a delivery timeout of UNKNOWN, which causes the value of the option Server_Delivery_Timeout to be used for the delivery timeout of messages of this type. This can be overridden by specifying a delivery timeout.

By default, the new message type has a load balancing mode of NONE. This can be overridden by specifying a load balancing mode (options are NONE, ROUND_ROBIN, WEIGHTED, and SORTED) for the create command.

By default, the new message type has a priority of UNKNOWN, which causes the value of the option Default_Msg_Priority to be used for the priority of messages of this type. This can be overridden by specifying a priority (which must be an integer between -32768 and 32767, inclusive) for the create command.

By default, the new message type has a user-defined property of zero (0). This can be overridden by specifying a user-defined property.

Caution

Message type names are not case sensitive.

There is no way to destroy a message type from the command interface.

Message types that are generated with create are transient and are lost when RTmon is terminated. Create commands can be stored in startup command files to generate more permanent message types for RTmon.

See Also

send

Examples

This example creates a user-defined XYZ_COORD_DATA message type with a delivery mode of ALL (delivery is guaranteed to all receivers), starts subscribing to the /system/test subject, and publishes an XYZ_COORD_DATA message to the /system/test subject (that is, sends a message to itself and any other processes subscribing to the /system/test subject):

MON> create msg_type xyz_coord_data 1 "int4 /*x*/ int4 /*y*/ int4 
/*z*/" delivery_mode all 
Created message type <xyz_coord_data> successfully. 
MON> subscribe /system/test 
Start subscribing to subject /system/test. 
MON> send xyz_coord_data /system/test 1 4 9 
Sent xyz_coord_data message to /system/test subject. 
MON> run 1 1 /* read and process one message, but wait at most one second for it */ 
/* Default action for unexpected messages is to print out the message. */ 
Received an unexpected message. 
type = xyz_coord_data 
sender = </workstation1.talarian.com_4971> 
sending server = </workstation1.talarian.com_4982> 
dest = </system/test> 
max = 2048 
size = 48 
current = 0 
read_only = false 
priority = 0 
delivery_mode = all 
ref_count = 1 
seq_num = 1 
server_seq_num = 8 
resend_mode = false 
user_prop = 0 
ack to = <client:local:workstation1.talarian.com:RTSERVER> 
data (num_fields = 3): 
  int4 1 
  int4 4 
  int4 9 
Processed a xyz_coord_data message. 

TIBCO SmartSockets™ User’s Guide
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com