--- title: "Publish Data" url: https://docs.catalyst.zoho.com/en/sdk/java/v1/cloud-scale/data-streams/publish-data/ description: "This page describes the method to publish real-time data to a Data Streams channel in your Java application with sample code snippets." last_updated: 2026-07-07T05:22:22Z service: Cloud Scale type: general related_links: - name: "Data Streams" url: /en/cloud-scale/help/data-streams/introduction --- # Publish Data [Catalyst Data Streams](https://docs.catalyst.zoho.com/en/cloud-scale/help/data-streams/introduction/) enables you to publish real-time data to a channel. Any active subscribers connected to that channel will receive the published data instantly through their WebSocket connections. You can publish data to a channel by passing the channel ID and the data payload to the `publishData()` method. #### Sample Code Snippet **Package Imports** ```java import com.zc.component.datastream.ZCDatastream; ``` ```java //Create a Data Streams instance ZCDatastream datastream = ZCDatastream.getInstance(); //Publish a message to the channel Boolean resp = datastream.publishData( "11365000000413001", "Hey! Welcome to Zoho DataStreams!" ); ```