Skip to content

Commit

Permalink
Fixed broker assembly configuration
Browse files Browse the repository at this point in the history
Signed-off-by: coduz <alberto.codutti@eurotech.com>
  • Loading branch information
Coduz committed May 14, 2019
1 parent 9e42961 commit 456ee08
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 22 deletions.
7 changes: 6 additions & 1 deletion assembly/broker/descriptors/kapua-broker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
<include>io.netty:netty</include>

<include>javax.inject:javax.inject</include>
<include>javax.batch:javax.batch-api</include>

<include>joda-time:joda-time</include>

Expand Down Expand Up @@ -252,9 +253,13 @@
<include>${pom.groupId}:kapua-foreignkeys</include>
<include>${pom.groupId}:kapua-guice</include>
<include>${pom.groupId}:kapua-job-api</include>
<!-- <include>${pom.groupId}:kapua-liquibase</include> -->
<include>${pom.groupId}:kapua-job-internal</include>
<include>${pom.groupId}:kapua-job-engine-api</include>
<include>${pom.groupId}:kapua-job-engine-remote</include>
<include>${pom.groupId}:kapua-message-api</include>
<include>${pom.groupId}:kapua-message-internal</include>
<include>${pom.groupId}:kapua-scheduler-api</include>
<include>${pom.groupId}:kapua-scheduler-quartz</include>
<include>${pom.groupId}:kapua-security-authentication-api</include>
<include>${pom.groupId}:kapua-security-authorization-api</include>
<include>${pom.groupId}:kapua-security-certificate-api</include>
Expand Down
26 changes: 25 additions & 1 deletion assembly/broker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,23 @@
</dependency>
<dependency>
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-tag-api</artifactId>
<artifactId>kapua-job-internal</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-job-engine-api</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-job-engine-remote</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-scheduler-api</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-scheduler-quartz</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.kapua</groupId>
Expand All @@ -116,6 +132,10 @@
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-security-certificate-internal</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-tag-api</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-tag-internal</artifactId>
Expand Down Expand Up @@ -288,6 +308,10 @@
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>javax.batch</groupId>
<artifactId>javax.batch-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,27 @@ public void processMessage(CamelKapuaMessage<?> message) throws KapuaException {
LOG.debug("Received notification message from device channel: client id '{}' - {}", message.getMessage().getClientId(), message.getMessage().getChannel());

KapuaNotifyMessage notifyMessage = (KapuaNotifyMessage) message.getMessage();

KapuaNotifyPayload notifyPayload = notifyMessage.getPayload();

DEVICE_MANAGEMENT_REGISTRY_MANAGER_SERVICE.processOperationNotification(
notifyMessage.getScopeId(),
notifyPayload.getOperationId(),
MoreObjects.firstNonNull(notifyMessage.getSentOn(), notifyMessage.getReceivedOn()),
notifyPayload.getResource(),
notifyPayload.getStatus(),
notifyPayload.getProgress());

JOB_DEVICE_MANAGEMENT_OPERATION_MANAGER_SERVICE.processJobTargetOnNotification(
notifyMessage.getScopeId(),
notifyPayload.getOperationId(),
MoreObjects.firstNonNull(notifyMessage.getSentOn(), notifyMessage.getReceivedOn()),
notifyPayload.getResource(),
notifyPayload.getStatus());
try {
DEVICE_MANAGEMENT_REGISTRY_MANAGER_SERVICE.processOperationNotification(
notifyMessage.getScopeId(),
notifyPayload.getOperationId(),
MoreObjects.firstNonNull(notifyMessage.getSentOn(), notifyMessage.getReceivedOn()),
notifyPayload.getResource(),
notifyPayload.getStatus(),
notifyPayload.getProgress());

JOB_DEVICE_MANAGEMENT_OPERATION_MANAGER_SERVICE.processJobTargetOnNotification(
notifyMessage.getScopeId(),
notifyPayload.getOperationId(),
MoreObjects.firstNonNull(notifyMessage.getSentOn(), notifyMessage.getReceivedOn()),
notifyPayload.getResource(),
notifyPayload.getStatus());
} catch (Exception e) {
LOG.error("Error while processing Device Management Operation Notification message!", e);
throw e;
}
}

public void processCommunicationErrorMessage(Exchange exchange, CamelKapuaMessage<?> message) throws KapuaException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ public enum GwtKapuaErrorCode {
DOWNLOAD_PACKAGE_EXCEPTION,
TRIGGER_NEVER_FIRE,
JOB_STARTING_ERROR,
<<<<<<< HEAD
ADMIN_ROLE_DELETED_ERROR,
PERMISSION_DELETE_NOT_ALLOWED
=======
PERMISSION_DELETE_NOT_ALLOWED,
JOB_STOPPING_ERROR,
ADMIN_ROLE_DELETED_ERROR
>>>>>>> 818fbdd00... Fixed Job processing
}

0 comments on commit 456ee08

Please sign in to comment.