Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: MOTION-157

...

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.

...

heading0
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

...

Node name

...

Value

...

Mgnl f
server

...

Mgnl f
activation

...

Mgnl f
subscribers

...

Mgnl n
magnoliaPublic8080

...

Mgnl n
subscriptions

...

Mgnl p
URL

...

http://localhost:8080/magnoliaPublic

...

Mgnl p
active

...

true

...

Mgnl p
class

...

info.magnolia.module.activation.DefaultSubscriber

...

Mgnl p
connectionTimeout

...

10000

...

Mgnl p
readTimeout

...

600000

Image Added

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 java.net.URL class. In addition to IPv4, this class supports the IPv6 addresses. When using an IPv6 address, the address has to be enclosed in square brackets, for example [2001:0db8:85a3:0000:0000:8a2e:0370:7334].

active

optional, default is false

Enables or disables the subscriber without deleting the setup. Useful when there are multiple subscribers.

class

required, default is info.magnolia.module.activation.DefaultSubscriber

Java Bean class that holds the subscriber configuration at runtime.

connectionTimeout

optional, default is 10000 (10 seconds)

Sets a connection timeout in milliseconds. If time runs out before a connection to the subscriber can be established, a java.net.SocketTimeoutException is thrown. A timeout of 0 is interpreted as an infinite timeout.

readTimeout

optional, default is 600000 (10 minutes)

Sets the read timeout in milliseconds. If time runs before the published content is read from the author instance, a java.net.SocketTimeoutException is thrown. A timeout of 0 is interpreted as an infinite timeout.

...

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.

...

heading0
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

Image Added

...

Node name

...

Value

...

Mgnl f
server

...

Mgnl f
activation

...

Mgnl f
subscribers

...

Mgnl n
magnoliaPublic8080

...

Mgnl n
subscriptions

...

Mgnl n
exampleSubSiteSubscription

...

Mgnl n
websiteSubscription

...

Mgnl p
fromURI

...

/

...

Mgnl p
repository

...

website

...

Mgnl p
toURI

...

/

...

Mgnl n
websiteSubscription

Properties:

repository

required

Name of the workspace.

fromURI

required

Workspace path on the author instance from which content is published. Use root / (forward slash) to subscribe to everything in the workspace. To subscribe to a single site, enter the site node such as /my-site. To subscribe to a particular branch, enter a more precise path such as /my-site/about.

toURI

required

Workspace path on the public instance to which the content is published.

enabled

optional, default is true

Enables and disables the subscription.

...

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.

Image Added

Info
Advanced Tables - Table Plus
heading0
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

Node name

Value

Mgnl f
server

Mgnl f
activation

Mgnl f
subscribers

Mgnl n
magnoliaPublic8080

Mgnl n
subscriptions

Mgnl p
URL

http://localhost:8080/magnoliaPublic

Mgnl p
active

true

Mgnl p
class

info.magnolia.module.activation.DefaultSubscriber

Mgnl n
productionOne

Mgnl n
subscriptions

Mgnl p
URL

http://www.siteone.com:8080/productionOne

Mgnl p
active

true

Mgnl p
class

info.magnolia.module.activation.DefaultSubscriber

Mgnl n
productionTwo

Mgnl n
subscriptions

Mgnl p
URL

http://www.sitetwo.com:8080/productionTwo

Mgnl p
active

false

Mgnl p
class

info.magnolia.module.activation.DefaultSubscriber

Info

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.

...

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.

...

heading0
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

...

Node name

...

Value

...

Mgnl f
server

...

Mgnl f
activation

...

Mgnl f
subscribers

...

Mgnl n
public

...

Mgnl n
subscriptions

...

Mgnl n
websiteSubscription

...

Mgnl p
fromURI

...

/public

...

Mgnl p
repository

...

website

...

Mgnl p
toURI

...

/public

...

Mgnl p
URL

...

http://localhost:8080/magnoliaPublic

...

Mgnl p
active

...

true

...

Mgnl p
class

...

info.magnolia.module.activation.DefaultSubscriber

...

Mgnl n
extranet

...

Mgnl n
subscriptions

...

Mgnl n
websiteSubscription

...

Mgnl p
fromURI

...

/extranet

...

Mgnl p
repository

...

website

...

Mgnl p
toURI

...

/extranet

...

Mgnl p
URL

...

http://localhost:8080/magnoliaExtranet

...

Mgnl p
active

...

true

...

Mgnl p
class

...

info.magnolia.module.activation.DefaultSubscriber

...

Mgnl n
intranet

...

Mgnl n
subscriptions

...

Mgnl n
websiteSubscription

...

Mgnl p
fromURI

...

/intranet

...

Mgnl p
repository

...

website

...

Mgnl p
toURI

...

/intranet

...

Mgnl p
URL

...

http://localhost:8080/magnoliaIntranet

...

Mgnl p
active

...

true

...

Mgnl p
class

...

info.magnolia.module.activation.DefaultSubscriber

Image Added

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.

...

heading0
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

Image Added

...

Node name

...

Value

...

Mgnl f
server

...

Mgnl f
activation

...

Mgnl f
subscribers

...

Mgnl n
example

...

Mgnl n
subscriptions

...

Mgnl n
news

...

Mgnl p
repository

...

website

...

Mgnl p
fromURI

...

/news

...

Mgnl p
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.

...

heading0
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

...

Node name

...

Value

...

Mgnl f
server

...

Mgnl f
activation

...

Mgnl f
subscribers

...

Mgnl n
example

...

Mgnl n
subscriptions

...

Mgnl n
news

...

Mgnl p
repository

...

website

...

Mgnl p
fromURI

...

/usa/politics/2015

...

Mgnl p
toURI

...

/news

Image Added

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.

...

heading0
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

...

Node name

...

Value

...

Mgnl f
server

...

Mgnl f
activation

...

Mgnl f
subscribers

...

Mgnl n
magnoliaPublic8080

...

Mgnl n
subscriptions

...

Mgnl n
websiteSubscription

...

Mgnl p
repository

...

website

...

Mgnl p
fromURI

...

/

...

Mgnl p
toURI

...

/

Image Added

Publishing the same content to multiple public instances

...

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.

...

heading0
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

...

Node name

...

Value

...

Mgnl f
server

...

Mgnl f
activation

...

Mgnl f
subscribers

...

Mgnl n
asia

...

Mgnl n
subscriptions

...

Mgnl n
branding

...

Mgnl p
repository

...

dam

...

Mgnl p
fromURI

...

/branding

...

Mgnl p
toURI

...

/corporate/branding

...

Mgnl p
URL

...

http://acme-asia.com:8080/magnoliaPublic

...

Mgnl p
active

...

true

...

Mgnl p
class

...

info.magnolia.module.activation.DefaultSubscriber

...

Mgnl n
europe

...

Mgnl n
subscriptions

...

Mgnl n
branding

...

Mgnl p
repository

...

dam

...

Mgnl p
fromURI

...

/branding

...

Mgnl p
toURI

...

/global-assets/branding

...

Mgnl p
URL

...

http://acme-europe.com:8080/magnoliaPublic

...

Mgnl p
active

...

true

...

Mgnl p
class

...

Image Added

Publishing content from multiple author instances

...