Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Wolfram Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • System Modeler
  • Wolfram Player
  • Finance Platform
  • Wolfram Engine
  • Enterprise Private Cloud
  • Application Server
  • Wolfram|Alpha Notebook Edition
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

WolframConsulting.com

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Wolfram Notebook Assistant + LLM Kit
    • System Modeler
    • Wolfram Player
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Wolfram Engine
    • Enterprise Private Cloud
    • Application Server
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
ChannelListen
  • See Also
    • ChannelSend
    • ChannelListener
    • RemoveChannelListener
    • ChannelListeners
    • ChannelSubscribers
    • CreateChannel
  • Related Guides
    • Accessing External Services & APIs
    • Channel-Based Communication
    • Raspberry Pi
    • Using Connected Devices
    • Sharing & Embedding Content
    • Mail, Messages, Etc.
    • Network Programming
    • See Also
      • ChannelSend
      • ChannelListener
      • RemoveChannelListener
      • ChannelListeners
      • ChannelSubscribers
      • CreateChannel
    • Related Guides
      • Accessing External Services & APIs
      • Channel-Based Communication
      • Raspberry Pi
      • Using Connected Devices
      • Sharing & Embedding Content
      • Mail, Messages, Etc.
      • Network Programming

ChannelListen[channel]

starts listening on the specified channel.

ChannelListen[channel,func]

applies func to the association corresponding to each message received on the channel.

ChannelListen[channel,None]

stores each message received on the channel, without applying any function.

ChannelListen[url]

listens on the specified URL, storing messages received, without requiring an explicit channel to exist on the channel broker.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Channel Specifications  
Handlers  
Options  
AutoRemove  
ChannelHistoryLength  
NotificationFunction  
Applications  
Email  
Remote Evaluation  
Wolfram Cloud  
Social Media  
Properties & Relations  
Possible Issues  
Neat Examples  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • ChannelSend
    • ChannelListener
    • RemoveChannelListener
    • ChannelListeners
    • ChannelSubscribers
    • CreateChannel
  • Related Guides
    • Accessing External Services & APIs
    • Channel-Based Communication
    • Raspberry Pi
    • Using Connected Devices
    • Sharing & Embedding Content
    • Mail, Messages, Etc.
    • Network Programming
    • See Also
      • ChannelSend
      • ChannelListener
      • RemoveChannelListener
      • ChannelListeners
      • ChannelSubscribers
      • CreateChannel
    • Related Guides
      • Accessing External Services & APIs
      • Channel-Based Communication
      • Raspberry Pi
      • Using Connected Devices
      • Sharing & Embedding Content
      • Mail, Messages, Etc.
      • Network Programming

ChannelListen

ChannelListen[channel]

starts listening on the specified channel.

ChannelListen[channel,func]

applies func to the association corresponding to each message received on the channel.

ChannelListen[channel,None]

stores each message received on the channel, without applying any function.

ChannelListen[url]

listens on the specified URL, storing messages received, without requiring an explicit channel to exist on the channel broker.

Details and Options

  • ChannelListen[…] gives a ChannelListener object.
  • In ChannelListen[channel,…], channel can be specified as a channel object or in any of the forms used inside ChannelObject.
  • ChannelListen[channel] is equivalent to ChannelListen[channel,Automatic].
  • If specified in ChannelListen[channel,func], func overrides the "MessageReceived" handler of channel. It is called with the association containing the following elements:
  • "Message"contents of the message
    "MessageID"unique message ID
    "Timestamp"server timestamp for the message
    "RequesterWolframID"Wolfram ID of the sender
    "RequesterWolframUUID"Wolfram UUID of the sender
    "ListenerID"ID of the current listener
  • The contents of a message are given literally if the message is a string, Real, Integer, ByteArray, True, False, Null, Image or Image3D, or a list or association of such objects. All other messages are given either in the form HoldComplete[DisableFormatting[expr]] or as a list or association of delayed rules of the form "name"DisableFormatting[val].
  • For security reasons, you should exercise caution in accessing unevaluated message contents, such as parts of held expressions, right-hand sides of delayed rules, or applying ToExpression to string messages.
  • ChannelListen accepts the following options:
  • AutoRemove Falsewhether to remove the listener after receiving one message
    ChannelBase$ChannelBasedefault channel base to assume
    ChannelHistoryLength 100how many messages to store in the listener cache
    NotificationFunction Inheritednotification to give when a message arrives
  • A channel listener set up by ChannelListen can be removed using RemoveChannelListener.
  • Removing a channel listener discards messages cached by the listener.
  • Terminating a Wolfram Language session removes all active channel listeners.

Examples

open all close all

Basic Examples  (2)

Create a channel and start listening:

Send a message to the channel and retrieve the contents of the message from the listener:

Remove the listener and delete the channel:

Define a custom handler function that will be executed when a message arrives:

Sending a message to the channel causes the function to be called:

The message is also recorded in the ChannelListener object:

Remove the listener and delete the channel:

Scope  (4)

Channel Specifications  (2)

Listen on a channel defined by a ChannelObject:

Listen on a channel in your home area on the channel broker server, specifying its name:

Listen on a channel specified by its fully qualified name:

Listen on a channel specified by its full URL:

Delete the channel, which removes the listener:

Listen on a channel in the common area on the server, specified by a URL:

Delete the channel, which removes the listener:

Handlers  (2)

Examine the arguments received by the handler function:

Sending a message to the channel prints the association received by the handler:

Delete the channel, which removes the listener:

Do not execute any handler function when messages are received:

You can still retrieve messages sent to the channel:

Delete the channel, which removes the listener:

Options  (3)

AutoRemove  (1)

Launch a listener that will remove itself after the first message is received:

The listener is active:

The listener is automatically removed after a message is sent and processed:

Delete the channel:

ChannelHistoryLength  (1)

Create a channel listener with ChannelHistoryLength set to 10:

Send 20 messages to the channel:

Only the 10 most-recently received messages are stored:

Delete the channel, which removes the listener:

NotificationFunction  (1)

Define a custom notification function in the listener:

The function is executed once a message is sent and processed:

Delete the channel, which removes the listener:

Applications  (4)

Email  (1)

In a desktop session, set up a listener that speaks the subject of an incoming message:

Create a MailReceiverFunction that forwards received mail to your listener:

Send an email to the receiver function and hear your listener speak:

Delete the channel, which removes the listener:

Remote Evaluation  (1)

In your Wolfram Cloud account, or any other remote Wolfram System, set up a listener that evaluates incoming messages and sends the result back to a specified channel:

Set up a receiving channel on your local system:

Send a command to the remote evaluator:

Access the response received:

Verify that the result is coming from a different machine:

Clean up:

Wolfram Cloud  (1)

ChannelListen allows your current session to receive updates from APIFunction, FormFunction and other functions as they are executed in the Wolfram Cloud:

Deploy a webpage that performs a simple operation and sends the result along with some metadata to the listener:

The listener dynamically updates as soon as the web form is submitted:

Delete the channel:

Social Media  (1)

Create an APIFunction that forwards the contents of HTTP requests to a channel:

Create an IFTTT applet that tracks mentions of the word "Mathematica" on Twitter and sends them to the APIFunction via HTTP:

Create a listener on the channel:

Create a service connection to Twitter and send a tweet containing the keyword:

List the messages received by the listener:

Delete the channel:

Properties & Relations  (3)

ChannelListen returns a ChannelListener object:

You can query the listener and retrieve its properties:

Delete the channel, which removes the listener:

Use RemoveChannelListener to remove a ChannelListener object:

Delete the channel:

On desktop Wolfram systems, output of Print executed in the message handler function is directed to the Messages window:

Delete the channel, which removes the listener:

Possible Issues  (1)

For security reasons, you cannot listen on other users' channels by default:

If you trust the channel author to potentially execute a message handler function on your computer, you can temporarily override the security setting:

Restore the default:

Neat Examples  (1)

Start listening on a channel and arrange to dynamically plot incoming points as they arrive:

Send data to the channel from the current session or from any other Wolfram Language session connected to the internet:

Set up a task to send points periodically to a channel's URL:

Stop sending data and delete the channel:

See Also

ChannelSend  ChannelListener  RemoveChannelListener  ChannelListeners  ChannelSubscribers  CreateChannel

Function Repository: ChannelMessages

Related Guides

    ▪
  • Accessing External Services & APIs
  • ▪
  • Channel-Based Communication
  • ▪
  • Raspberry Pi
  • ▪
  • Using Connected Devices
  • ▪
  • Sharing & Embedding Content
  • ▪
  • Mail, Messages, Etc.
  • ▪
  • Network Programming

History

Introduced in 2016 (11.0) | Updated in 2020 (12.1)

Wolfram Research (2016), ChannelListen, Wolfram Language function, https://reference.wolfram.com/language/ref/ChannelListen.html (updated 2020).

Text

Wolfram Research (2016), ChannelListen, Wolfram Language function, https://reference.wolfram.com/language/ref/ChannelListen.html (updated 2020).

CMS

Wolfram Language. 2016. "ChannelListen." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/ChannelListen.html.

APA

Wolfram Language. (2016). ChannelListen. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ChannelListen.html

BibTeX

@misc{reference.wolfram_2025_channellisten, author="Wolfram Research", title="{ChannelListen}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/ChannelListen.html}", note=[Accessed: 01-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_channellisten, organization={Wolfram Research}, title={ChannelListen}, year={2020}, url={https://reference.wolfram.com/language/ref/ChannelListen.html}, note=[Accessed: 01-December-2025]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Player
  • Wolfram Engine

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2025 Wolfram
© 2025 Wolfram | Legal & Privacy Policy |
English