Wowza Community

Reloading MediaCache.xml via Java extension / without restarting Wowza?

As the title says it, I’m interested in a way to reload a running wowza instance, when a MediaCache.xml changes due to a media cache source that has been added, removed or updated (changed parameters, bucket, credentials).

It’s possible to shut down/start application instances/applications via Java API, forcing a reload of for example, stream schedule configs and similar. I’d like to find a way to reload MediaCache.xml in the same way.

In addition to the above: it would be great if we could specify per-vhost MediaCache.xml files, as currently media cache sources are a single point of origin, meaning you’d have to make them unique for each vhost by name, instead of having the same name “amazons3” which would point to different buckets/credentials as declared in separate vhosts. Maybe there’s a way to do it, and I just couldn’t deduce it from the howtos and white paper about media cache?

Hi Tit,

MediaCache.xml files should be VHost specific. If you have multiple VHosts, you can have a MediaCache.xml located in the individual VHost configuration path. When you set MediaCache to work at the VHost level, you should remove the ServerListener entry. Otherwise, it will load at both levels. You would then move the listener to the VHost.xml level as follows:

Server level MediaCache:

<ServerListeners>
<ServerListener>
<BaseClass>com.wowza.wms.plugin.mediacache.impl.MediaCacheServerListener</BaseClass>
</ServerListener>
</ServerListeners>

VHost level MediaCache:

<VHostListeners>
<VHostListener>
<BaseClass>com.wowza.wms.plugin.mediacache.impl.MediaCacheServerListener</BaseClass>
</VHostListener>
</VHostListeners>

Since you are configuring this on a VHost level, you should be able to restart only the VHost, instead of on the Server level. You can do so either through REST API or JMX.

Michelle