---
schema_version: "1"
id: c3be48c93290c872b9691fd47e1176a6fa549f05614ab4f4a379a4fd15cebb95
title: Pushing Messages to a Flow form a Message Source
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mule-sdk/latest/sources-push-message.md
canonical_url: https://docs.mulesoft.com/mule-sdk/latest/sources-push-message
source_site: docs.mulesoft.com
content_type: documentation
content_hash: bf68f71ad1e63540e367d517919ca8b111b4b552624a59d303e67bb6739b21bc
description: MuleSoft Documentation Site
release: "1.13"
latest: true
---
---
product: Mule SDK
version: 1.13
is-latest-version: true
keywords: mule, sdk, sources, listener, triggers, generate, push, message
---

# Pushing Messages to a Flow form a Message Source

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

After generating a piece of information for the flow, the source uses the `SourceCallback` to send
the information to the flow. Returning to the minimalistic HTTP listener example:

```java
public class HttpListener extends Source<InputStream, HttpRequestAttributes> {

    @Override
    public void onStart(SourceCallback<InputStream, HttpRequestAttributes> sourceCallback) throws MuleException {
        httpServer = serverProvider.connect(); (1)

        server.listen(path).onRequest(request -> { (2)
            Result<InputStream, HttpRequestAttributes> result = requestToResult(request); (3)
            sourceCallback.handle(result); (4)
        });
    }
}
```

<table><tbody><tr><td><i data-value="1"></i><b>1</b></td><td>The example uses the ConnectionProvider to obtain an <code>HttpServer</code>. The typical connection provider most already configured the server with the proper host and port.</td></tr><tr><td><i data-value="2"></i><b>2</b></td><td>HTTP requests are pushed into the server by the remote clients, and the <code>HttpServer</code> component will notify the source of every request. The source then uses the <code>SourceCallback</code> to push the message into the flow.</td></tr><tr><td><i data-value="3"></i><b>3</b></td><td>The message is represented by leveraging the same <code>Result</code> object that operations use to communicate complex outputs. See <a href="https://docs.mulesoft.com/mule-sdk/latest/result-object"><code>Result</code></a> for more information.</td></tr><tr><td><i data-value="4"></i><b>4</b></td><td>The example uses the <code>handle(Result)</code> method in the <code>SourceCallback</code> to pass the message.</td></tr></tbody></table>

## Threading Model

Once the `Result` object is passed to the `SourceCallback` through the `handle(Result)` method,
message processing occurs asynchronously in a different thread than the one invoking the method.

The next step explains how to catch the result of the Flow processing and optionally send a
response.

## Next Step

- [Obtaining Flow output and Sending responses from a Message Source](https://docs.mulesoft.com/mule-sdk/latest/sources-response)
