# Closed captions processSendDirectMessages() problem

**URL:** <https://community.wowza.com/t/closed-captions-processsenddirectmessages-problem/95199>\
**Category:** Wowza Streaming Engine\
**Created:** [July 27, 2022, 7:42am UTC](https://community.wowza.com/t/closed-captions-processsenddirectmessages-problem/95199 "2022-07-27T07:42:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Javier\_Espanol1](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@Javier\_Espanol1](https://community.wowza.com/u/Javier_Espanol1)\
**Post date:** [July 27, 2022, 7:42am UTC](https://community.wowza.com/t/closed-captions-processsenddirectmessages-problem/95199/1 "2022-07-27T07:42:53Z")

</div>

I’m using this code from Wowza official page and **((MediaStream)stream).processSendDirectMessages();** gives me a warn in the log: _MediaStream#processSendDirectMessages() is no longer available for api use._

Any idea about how to solve it or wich is the right method?

```
public void sendTextDataMessage(IMediaStream stream, OnTextData onTextData)	{
		try {
			AMFDataObj amfData = new AMFDataObj(); 
			amfData.put("text", new AMFDataItem(onTextData.text));
			amfData.put("language", new AMFDataItem(languageID));
			amfData.put("trackid", new AMFDataItem(trackNumber));
			stream.sendDirect("onTextData", amfData);
			((MediaStream)stream).processSendDirectMessages();	

		} catch(Exception e) {
			e.printStackTrace();
		}
	}
```

---

<div class="post-metadata">

**Author:** ![Rafael\_Martony](https://avatars.discourse-cdn.com/v4/letter/r/22d042/32.png) [@Rafael\_Martony](https://community.wowza.com/u/Rafael_Martony)\
**Post date:** [October 19, 2022, 9:48pm UTC](https://community.wowza.com/t/closed-captions-processsenddirectmessages-problem/95199/2 "2022-10-19T21:48:29Z")

</div>

Hi @Javier_Espanol1,

I had the same question, _Wowza support_ replied:

> The `processSendDirectMessages()` method has been deprecated with the later Wowza Streaming Engine versions.
> 
> You should be able to remove that portion of your code with no consequences.

If this is the case, I don’t understand why the method isn’t annotated with @Deprecated.  
Also, the example code is still using this method ([https://www.wowza.com/downloads/forums/closedcaptionlive/PublishOnTextData.zip](https://www.wowza.com/downloads/forums/closedcaptionlive/PublishOnTextData.zip)).

Hopefully someone can shed some light.

Best regards,  
Rafael

---

<div class="post-metadata">

**Author:** ![Connessione](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Connessione](https://community.wowza.com/u/Connessione)\
**Post date:** [October 31, 2022, 8:19am UTC](https://community.wowza.com/t/closed-captions-processsenddirectmessages-problem/95199/3 "2022-10-31T08:19:33Z")

</div>

> [@Rafael\_Martony](#):
>
> > You should be able to remove that portion of your code with no consequences.

Probably a question best answered by Wowza engineers. However, looking at some GitHub stuff I would assume that most of the examples & modules don’t look like they were updated recently.

Could be that

`((MediaStream)stream).processSendDirectMessages();`

is automatically implied now when you write

`stream.sendDirect("onTextData", amfData);`
