message = CreateMessage(“topicName”)
function description
create a message instance, by setting topic field
input
topicName: a topic name
return
a new message instance, after used it, you need call DestroyMessage(message)
DestroyMessage(message)
function description
destroy a message instance, delete memmory
input
message: message instance
SetMessageTopic(message, topic)
function description
set topic field value for the message
input
message: message instance
topic: a topic name
SetMessageTags(message, tags)
function description
set tag field value for the message
input
message: message instance
tags: tag for the topic
SetMessageKeys(message, keys)
function description
set key field value for the message
input
message: message instance
keys: key for the topic
SetMessageBody(message, stringBody)
function description
set body for the message
input
message: message instance
body: message body as string
SetByteMessageBody(message, byteBody, byteLength)
function description
set body for the message
input
message: message instance
byteBody: message body as byte[] byteLength: byteBody's length
SetMessageProperty(message, key, value)
function description
set extend k-v for message
input
message: message instance
key: string key value: string value
SetMessageDelayTimeLevel(message, level)
function description
set delay level
input
message: message instance
level: delay level as int
topic = GetMessageTopic(msgExt)
function description
get topic name from a message instance
input
msgExt: message instance
return
topic: topic name
tag = GetMessageTags(msgExt)
function description
get tag from a message instance
input
msgExt: message instance
return
tag: tag
key = GetMessageKeys(msgExt)
function description
get message key from a message instance
input
msgExt: message instance
return
key: message key
body = GetMessageBody(msgExt)
function description
get message body from a message instance
input
msgExt: message instance
return
body: message body as string
value = GetMessageProperty(msgExt, key)
function description
get a message proprty value from a message instance
input
msgExt: message instance
key: property key
return
value: property value as string
messageId = GetMessageId(msgExt)
function description
get a message id from a message instance
input
msgExt: message instance
return
messageId: message id as string