Magnolia 5.7 reached extended end of life on May 31, 2022. Support for this branch is limited, see End-of-life policy. Please note that to cover the extra maintenance effort, this EEoL period is a paid extension in the life of the branch. Customers who opt for the extended maintenance will need a new license key to run future versions of Magnolia 5.7. If you have any questions or to subscribe to the extended maintenance, please get in touch with your local contact at Magnolia.
The default implementation for content publishing is provided via the functions of the Publishing module, where subscribers are called receivers and their configuration has been moved from /server/activation/subscribers
to /modules/publishing-core/config/receivers
. See the Receivers page for more details.
Subscriber is a public Magnolia instance that receives content from an author instance. This page explains how to configure subscribers and subscriptions.
About the publishing process
The technical Magnolia term for publishing is activation but for all practical purposes publishing and activating are synonymous. Activation is the system process that copies content from an author to public instances whereas publishing is triggered by the user.
License limitations
- Community Edition supports one subscriber. You can configure many subscribers but only the first subscriber will receive published content. Publishing is handled by the Activation module.
- Enterprise Edition supports many subscribers. Publishing is handled by the Transactional Activation module.
Verifying publication success
There are three ways to verify successful publication:
- Status indicator changes to green on the author instance.
- Page content on the public instance is new. Request the page to test.
- Activation log
/webapps/magnoliaAuthor/logs/magnolia-activation.log
contains a success entry. See Monitoring about logging and debugging.
Configuration
Subscriber configuration is in Configuration > /server/activation/subscribers
. Here you define the address of the subscriber and the type of content it should receive. In the default setup, the public instance is configured as a subscriber of the author instance.
Subscribers
A subscriber is a public Magnolia instance. Here is an example subscriber from the default installation. The name of the subscriber node is magnoliaPublic8080
. You can choose any name, just pick a descriptive name like corporate-website
or intranet
.
Node name | Value |
---|---|
server | |
activation | |
subscribers | |
magnoliaPublic8080 | |
subscriptions | |
URL | http://localhost:8080/magnoliaPublic |
active | true |
class | info.magnolia.module.activation.DefaultSubscriber |
connectionTimeout | 10000 |
readTimeout | 600000 |
Properties:
URL | required Host name (or IP address) and port number of the receiving public instance. You can use either HTTP or HTTPS protocol in the subscriber URL. The syntax of URL is defined by RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax and amended by RFC 2732: Format for Literal IPv6 Addresses in URLs. The Literal IPv6 address format also supports scoped addresses. The syntax and usage of scope_ids is described in Textual representation of IPv6 scoped addresses. The connection to a subscriber (public instance) during publishing is implemented by the |
active | optional , default is Enables or disables the subscriber without deleting the setup. Useful when there are multiple subscribers. |
class | required, default is Java Bean class that holds the subscriber configuration at runtime. |
connectionTimeout | optional, default is Sets a connection timeout in milliseconds. If time runs out before a connection to the subscriber can be established, a |
readTimeout | optional, default is Sets the read timeout in milliseconds. If time runs before the published content is read from the author instance, a |
Subscriptions
The content to be published is configured in a subscription. By default, there is a subscription for each Magnolia workspace. The subscription node name is up to you. The default naming convention uses the name of the workspace, for example websiteSubscription
.
Node name | Value |
---|---|
server | |
activation | |
subscribers | |
magnoliaPublic8080 | |
subscriptions | |
exampleSubSiteSubscription | |
websiteSubscription | |
fromURI | / |
repository | website |
toURI | / |
websiteSubscription |
Properties:
repository | required Name of the workspace. |
fromURI | required Workspace path on the author instance from which content is published. Use root |
toURI | required Workspace path on the public instance to which the content is published. |
enabled | optional, default is Enables and disables the subscription. |
Subscribers can subscribe to any content item: websites, website sections, configuration settings, custom content types, forums, comments, documents, images and so on. For example, you could publish a campaign site to a dedicated public instance.
Trailing slash
A trailing slash in the fromURI
path limits the published content to the subnodes.
fromURI | Activated content |
---|---|
| Everything |
|
|
| Content under |
|
|
| Content under |
Configuring multiple subscribers
A single author instance can publish content to multiple subscribers. Subscribers are key to building high-availability, load-balanced environments since they can be configured to receive targeted content. See Creating a new public instance .
Typically each subscriber resides on a separate server. In the example below, productionOne
and productionTwo
are subscribers. Each has a unique domain name (siteone, sitetwo) so they likely receive different content.
Node name | Value |
---|---|
server | |
activation | |
subscribers | |
magnoliaPublic8080 | |
subscriptions | |
URL | http://localhost:8080/magnoliaPublic |
active | true |
class | info.magnolia.module.activation.DefaultSubscriber |
productionOne | |
subscriptions | |
URL | http://www.siteone.com:8080/productionOne |
active | true |
class | info.magnolia.module.activation.DefaultSubscriber |
productionTwo | |
subscriptions | |
URL | http://www.sitetwo.com:8080/productionTwo |
active | false |
class | info.magnolia.module.activation.DefaultSubscriber |
Once you have your production environment established, it is recommended that you delete the default /magnoliaPublic8080
subscriber. This avoids unnecessary errors in log files that may obfuscate errors from actual subscribers.
Use cases
Site specific subscribers
Magnolia's multisite feature allows you to manage many sites on one author instance. You can configure a separate subscriber for each site. When content from one site is published it goes only to the subscriber configured for that site.
In the example below, a public corporate website, an extranet site and an intranet site are all managed on the same author instance. Subscribers public
, extranet
and intranet
subscribe to the corresponding sites. For example, the intranet
subscriber subscribes to content in the /intranet
site. Content on that site is published to the magnoliaIntranet
public instance.
This kind of configuration simplifies the security setup. You don't need to segregate anonymous visitors from authenticated intranet visitors since no intranet content is ever published to the magnoliaPublic
instance. Intranet content is published only to magnoliaIntranet
which is a completely different instance.
Node name | Value |
---|---|
server | |
activation | |
subscribers | |
public | |
subscriptions | |
websiteSubscription | |
fromURI | /public |
repository | website |
toURI | /public |
URL | http://localhost:8080/magnoliaPublic |
active | true |
class | info.magnolia.module.activation.DefaultSubscriber |
extranet | |
subscriptions | |
websiteSubscription | |
fromURI | /extranet |
repository | website |
toURI | /extranet |
URL | http://localhost:8080/magnoliaExtranet |
active | true |
class | info.magnolia.module.activation.DefaultSubscriber |
intranet | |
subscriptions | |
websiteSubscription | |
fromURI | /intranet |
repository | website |
toURI | /intranet |
URL | http://localhost:8080/magnoliaIntranet |
active | true |
class | info.magnolia.module.activation.DefaultSubscriber |
Flat authoring
Subscriber configuration can turn a hierarchical site structure to a flat one or vice versa. Editors may prefer a flat hierarchy on the author instance. For example, a busy site section such as news is edited several times a day. If that section resides deep in the site hierarchy it takes editors too much time to navigate the tree. Make an editor's life easier by moving the news section to the root level on the author instance. Adding news is now quicker. The subscription publishes the news pages to their intended deeper location on the public instance.
Node name | Value |
---|---|
server | |
activation | |
subscribers | |
example | |
subscriptions | |
news | |
repository | website |
fromURI | /news |
toURI | /usa/politics/2015 |
Flat public site
An opposite example is a flat public site. Search engines prefer a shallow site structure. As a rule of thumb, the flatter the public structure the better. The higher a page appears in the site structure the more likely it will be ranked high by a crawler.
In this example, news pages are published from a deep authoring location /usa/politics/2015
to a more SEO favorable /news
.
Node name | Value |
---|---|
server | |
activation | |
subscribers | |
example | |
subscriptions | |
news | |
repository | website |
fromURI | /usa/politics/2015 |
toURI | /news |
Publishing multiple sites to the same public instance
The demo websites /travel
and /sportstation
that ship with the Magnolia bundle are an example of publishing two different sites to the same public instance. Subscriber magnoliaPublic8080
subscribes to the root node /
in the website
workspace so it receives content from both sites.
Node name | Value |
---|---|
server | |
activation | |
subscribers | |
magnoliaPublic8080 | |
subscriptions | |
websiteSubscription | |
repository | website |
fromURI | / |
toURI | / |
Publishing the same content to multiple public instances
You can publish the same content to many sites. A corporation with regional affiliates may want to keep branding under tight control. Company logos, slogans and boilerplate text must be displayed on affiliate sites in exactly the same way.
Suppose that the corporation stores branding material such as logos in the dam
workspace in a /branding
folder. In this subscription example the brand material is published to Asia and Europe affiliate sites. While the content is the same, you can publish it to different location on the target sites depending on how those sites are organized.
Node name | Value |
---|---|
server | |
activation | |
subscribers | |
asia | |
subscriptions | |
branding | |
repository | dam |
fromURI | /branding |
toURI | /corporate/branding |
URL | http://acme-asia.com:8080/magnoliaPublic |
active | true |
class | info.magnolia.module.activation.DefaultSubscriber |
europe | |
subscriptions | |
branding | |
repository | dam |
fromURI | /branding |
toURI | /global-assets/branding |
URL | http://acme-europe.com:8080/magnoliaPublic |
active | true |
class | info.magnolia.module.activation.DefaultSubscriber |
Publishing content from multiple author instances
Publishing content from multiple author instances to the same public instance can be useful when:
- You serve multiple websites from the same server. The server may be specifically designed to serve particular type of content (files, video).
- Different editorial teams contribute content to the same site. For example, a finance news team in Asia writes about Asian markets on their own author instance. However, they publish the content to a U.S. based public site.
Multiple author instances do not know about each other. This can lead to conflicts. When one user working on author1
publishes a page, another user on author2
does not know that this happened. He does not see the page on author2
, only on the public instance. Even pages that exist on both author instances may be edited unnoticed. The Soft Locking module helps you handle concurrent editing but it only works within one author instance.
Publishing heavy binary content to a dedicated instance
You can publish large binary content such as video to a dedicated public instance that acts as a media server. Compared to other public instances, the media server may have more disk space or it may be configured specifically for video streaming. Other public instances serve HTML on their own but link to videos on the media instance.