A minimal implementation of the MessageChannel API is now available in Workers. This means that you can use MessageChannel to send messages between different parts of your Worker, but not across different Workers.
The MessageChannel and MessagePort APIs will be available by default at the global scope
with any worker using a compatibility date of 2025-08-15 or later. It is also available
using the expose_global_message_channel compatibility flag, or can be explicitly disabled
using the no_expose_global_message_channel compatibility flag.
const { port1, port2 } = new MessageChannel();
port2.onmessage = (event) => { console.log('Received message:', event.data);};
port2.postMessage('Hello from port2!');Any value that can be used with the structuredClone(...) API can be sent over the port.
Differences
There are a number of key limitations to the MessageChannel API in Workers:
- Transfer lists are currently not supported. This means that you will not be able to transfer
ownership of objects like
ArrayBufferorMessagePortbetween ports. - The
MessagePortis not yet serializable. This means that you cannot send aMessagePortobject through thepostMessagemethod or via JSRPC calls. - The
'messageerror'event is only partially supported. If the'onmessage'handler throws an error, the'messageerror'event will be triggered, however, it will not be triggered when there are errors serializing or deserializing the message data. Instead, the error will be thrown when thepostMessagemethod is called on the sending port. - The
'close'event will be emitted on both ports when one of the ports is closed, however it will not be emitted when the Worker is terminated or when one of the ports is garbage collected.
Source: Cloudflare
Latest Posts
- Dynamics 365 Customer Service- Estimate AI credits for agents from forecasted demand [MC1307183]
![Dynamics 365 Customer Service- Estimate AI credits for agents from forecasted demand [MC1307183] 2 pexels cottonbro 5054213](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Microsoft Power Automate – Automate administrator-level desktop applications in unattended runs [MC1307177]
![Microsoft Power Automate - Automate administrator-level desktop applications in unattended runs [MC1307177] 3 pexels pixabay 267961](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Microsoft Dataverse – Create Dataverse agent users with Microsoft Entra agent identity [MC1307182]
![Microsoft Dataverse - Create Dataverse agent users with Microsoft Entra agent identity [MC1307182] 4 pexels anniroenkae 15578416](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- GCP Release Notes: May 08, 2026


![Dynamics 365 Customer Service- Estimate AI credits for agents from forecasted demand [MC1307183] 2 pexels cottonbro 5054213](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-cottonbro-5054213-150x150.webp)
![Microsoft Power Automate - Automate administrator-level desktop applications in unattended runs [MC1307177] 3 pexels pixabay 267961](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-pixabay-267961-150x150.webp)
![Microsoft Dataverse - Create Dataverse agent users with Microsoft Entra agent identity [MC1307182] 4 pexels anniroenkae 15578416](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-anniroenkae-15578416-150x150.webp)

