CQ Actions Replication Message

Replication-based messages implementation of the CQ Actions

License

License

Categories

Categories

IDE Development Tools
GroupId

GroupId

com.cognifide.cq.actions
ArtifactId

ArtifactId

com.cognifide.cq.actions.msg.replication
Last Version

Last Version

6.4.0
Release Date

Release Date

Type

Type

bundle
Description

Description

CQ Actions Replication Message
Replication-based messages implementation of the CQ Actions
Project Organization

Project Organization

Cognifide

Download com.cognifide.cq.actions.msg.replication

Dependencies

compile (1)

Group / Artifact Type Version
javax.jcr : jcr jar 2.0

provided (12)

Group / Artifact Type Version
com.cognifide.cq.actions : com.cognifide.cq.actions.core jar 6.4.0
com.adobe.aem : uber-jar jar 6.4.0
org.osgi : org.osgi.core jar 4.2.0
org.osgi : org.osgi.compendium jar 4.2.0
org.apache.felix : org.apache.felix.scr.annotations jar 1.9.4
org.apache.sling : org.apache.sling.api jar 2.4.0
org.apache.sling : org.apache.sling.commons.osgi jar 2.2.0
org.apache.sling : org.apache.sling.settings jar 1.2.2
org.apache.sling : org.apache.sling.jcr.api jar 2.1.0
org.slf4j : slf4j-api jar 1.6.1
commons-lang : commons-lang jar 2.4
biz.aQute.bnd : bndlib jar 2.4.0

Project Modules

There are no modules declared in this project.

AEM Actions

Purpose

AEM Actions is a mechanism serving as the underlying transport layer, which ensures that data is properly and safely transported from publish instances to author instance and is processed on the latter.

Features

  • Seamless communication from AEM publish to author
  • Messages contain key-value map, where key is a String and value is a String, Calendar or a primitive (int, float, etc.)
  • You may register any number of author services listening to a given message topic

Prerequisites

CQ Actions version below 4.0.0:

  • CQ 5.6.1 or AEM 6

CQ Actions version 4.0.0:

  • AEM 6.2

AEM Actions version 6.0.0:

  • AEM 6.3

Installation

Add dependencies to your project:

<dependency>
    <groupId>com.cognifide.cq.actions</groupId>
    <artifactId>com.cognifide.cq.actions.api</artifactId>
    <version>4.0.0</version>
</dependency>
<dependency>
    <groupId>com.cognifide.cq.actions</groupId>
    <artifactId>com.cognifide.cq.actions.core</artifactId>
    <version>4.0.0</version>
</dependency>
<dependency>
    <groupId>com.cognifide.cq.actions</groupId>
    <artifactId><!-- choose appropriate transport type, see below --></artifactId>
    <version>4.0.0</version>
</dependency>

Usage

Implement data processing using com.cognifide.actions.api.ActionReceiver interface. Remember to create OSGi descriptors for the class:

@Service
@Component
public class MyActionReceiver implements ActionReceiver {

    private static final Logger LOGGER = LoggerFactory.getLogger(MyActionReceiver.class);

    @Override
    public String getType() {
        return "my-action";
    }

    @Override
    public void handleAction(ValueMap properties) {
        LOGGER.info("received action: " + properties);
    }

}

On the publish instance, whenever you would like to invoke any action on author instance just invoke following snippet:

@Reference
private ActionSubmitter actionSubmitter;

Map<String, Object> properties = new HashMap<String, Object>();
properties.put("company name", "Cognifide");
properties.put("city", "Poznan");
properties.put("awesome", true);
actionSubmitter.sendAction("my-action", properties);

Once, the sendAction() is invoked, the action will be send to the author instance and appropriate ActionReceiver will be called.

Transport types

AEM Actions supports a few types of the transport layer to get the message delivered from publish to author.

Reverse-replication

This is the classic approach, where messages are serialized into pages and the standard reverse-replication mechanism transfers them to the author. The author instance connects to the publish every 30 seconds to check if there is some user-generated content to be reverse-replicated, so it may take a while before the ActionReceiver gets its message.

  • compatible with: CQ 5.6.1 and AEM 6 (in versions below 4.0.0) and with AEM 6.2 in version 4.0.0.
  • bundle to use: com.cognifide.cq.actions.msg.replication.

Push

The author instance GETs the publish /bin/cognifide/cq-actions servlet. The servlet doesn't drop the connection, but holds it and puts each serialized action as a response fragments. Author confirms receiving action with a separate POST. The messages are delivers immediately.

  • compatible with: CQ 5.6.1 and AEM 6 (in versions below 4.0.0) and with AEM 6.2 in version 4.0.0.
  • bundle to use: com.cognifide.cq.actions.msg.push.

Websockets

The author connects to the publish using websocket. Created connection is used to deliver messages, which can be received immediately.

  • compatible with: AEM 6 (in versions below 4.0.0). Currently this type of messaging is not supported on AEM 6.2.
  • bundle to use: com.cognifide.cq.actions.msg.websocket.

Commercial Support

Technical support can be made available if needed. Please contact us for more details.

We can:

  • prioritize your feature request,
  • tailor the product to your needs,
  • provide a training for your engineers,
  • support your development teams.
com.cognifide.cq.actions

Wunderman Thompson Technology (formerly Cognifide)

We are now Wunderman Thompson Technology. You could find us on https://github.com/wttech

Versions

Version
6.4.0
6.0.2
6.0.1
6.0.0
5.0.2
5.0.1
5.0.0
4.0.0
3.0.0