Submit a message
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 fees table for base transaction fee
Please use the Hedera fee estimator to estimate your transaction fee cost
HCS message size: 1024 bytes
Constructor | Description |
---|---|
| Initializes a ConsensusMessageSubmitTransaction object |
Methods
Method | Type | Description | Requirement |
---|---|---|---|
| TopicId | The topic ID to submit the message to | Required |
| String | The message in a String format | Optional |
| byte [ ] | The message in a byte array format | Optional |
| ByteString | The message in a ByteString format | Optional |
| int | The number of chunks to break the message into. Default:10 | Optional |
| TransactionId, int, int | initialId: TransactionID of the first chunk, gets copied to every subsequent chunk in a fragmented message. total: total number of chunks number: The sequence number (from 1 to total) of the current chunk in the message. | Optional |
Get transaction values
Method | Type | Description |
---|---|---|
| TopicId | The topic ID to submit the message to |
| ByteString | The message being submitted |
| byte [ ] | The hash for each transaction |
Last updated