MashZone NextGen 10.2 | Appendix | Legacy Presto components | Apps and Workspaces | Custom Apps | App Specification Reference | <topics> or <topic> | <topic>
 
<topic>
One topic communicated between apps that this app either subscribes to or publishes. This element enables wiring with other apps for this app and topic.
Can Contain
Allowed In
<app>
Attributes
Name
Required
Description
name
yes
The name of this topic.
Tip: It is a best practice to start topic names with a unique namespace, such as the namespace used by the custom app that subscribes to or publishes the topic.
Names for topics must be unique within an app. You may use any character that is valid in JavaScript, however, keep the following rules in mind:
*Both . and * have a specific meaning in topic names.
Topic names are composed of one or more tokens and . is the token separator.
You can use * as a wildcard for individual tokens in topic names when you subscribe to topics. So for a subscription, both client.*.issue and myOrg.** are valid topic names.
*Do not use the following characters:
*White space characters, such as space or tab
*Quote marks or other punctuation, such as ? or (
*Control characters
For more information on valid topic names, see the OpenAjax Hub 2.0 Specification.
datatype
The datatype that describes the payload for messages in this topic. Valid datatypes include:
*string
*number
*boolean
*date
*timestamp
*object = a complex payload. This is the default.
*any = any type is accepted.
This datatype has three implications to keep in mind:
*No <properties> should be specified for topics with this datatype since there are no limits.
*Because no properties are specified, wiring can only happen at the topic level. You can wire a published topic to a subscription topic with a datatype of any but you cannot wire properties in that published topic.
*The handler function for subscription topics with this datatype must be able to handle messages with inappropriate data.
publish
Whether this app publishes messages to this topic (true | false). Defaults to false.
Note: Only one of publish or subscribe can be true for a topic.
subscribe
Whether this app subscribes to messages for this topic (true | false). Defaults to false.
Note: Only one of publish or subscribe can be true for a topic.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release