Submit a message
Last updated
Last updated
A transaction that submits a topic message to the Hedera network. To access the messages submitted to a topic ID, subscribe to the topic via a mirror node. The mirror node will publish the ordered messages to subscribers. Once the transaction is successfully executed, the receipt of the transaction will include the topic's updated sequence number and topic running hash.
Transaction Signing Requirements
Anyone can submit a message to a public topic
The submitKey is required to sign the transaction for a private topic
Transaction Fees
Please see the transaction and query table for base transaction fee
Please use the to estimate your transaction fee cost
setTopicId(<topicId>)
TopicId
The topic ID to submit the message to
Required
setMessage(<message>)
String
The message in a String format
Optional
setMessage(<message>)
byte [ ]
The message in a byte array format
Optional
setMessage(<message>)
ByteString
The message in a ByteString format
Optional
getTopicId()
TopicId
The topic ID to submit the message to
getMessage()
ByteString
The message being submitted
getAllTransactionHash()
byte [ ]
The hash for each transaction