[jira] [Commented] (ARIES-1881) Mongo based implementation

2019-01-06 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/ARIES-1881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16735243#comment-16735243
 ] 

ASF subversion and git services commented on ARIES-1881:


Commit 57eca0b013211e88c72c0cfe7aafa6fe81554e23 in aries-journaled-events's 
branch refs/heads/master from Christian Schneider
[ https://gitbox.apache.org/repos/asf?p=aries-journaled-events.git;h=57eca0b ]

ARIES-1881 - Fixed indents and test scope


> Mongo based implementation
> --
>
> Key: ARIES-1881
> URL: https://issues.apache.org/jira/browse/ARIES-1881
> Project: Aries
>  Issue Type: New Feature
>  Components: Journaled Events
>Reporter: Christian Schneider
>Priority: Major
> Fix For: journaled-events-0.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARIES-1881) Mongo based implementation

2019-01-06 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/ARIES-1881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16735237#comment-16735237
 ] 

ASF subversion and git services commented on ARIES-1881:


Commit feb25a9412f6d04b93c373ac0a95d2f021981c3b in aries-journaled-events's 
branch refs/heads/master from Christian Schneider
[ https://gitbox.apache.org/repos/asf?p=aries-journaled-events.git;h=feb25a9 ]

ARIES-1881 - Fix OSGi config


> Mongo based implementation
> --
>
> Key: ARIES-1881
> URL: https://issues.apache.org/jira/browse/ARIES-1881
> Project: Aries
>  Issue Type: New Feature
>  Components: Journaled Events
>Reporter: Christian Schneider
>Priority: Major
> Fix For: journaled-events-0.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (ARIES-1881) Mongo based implementation

2019-01-06 Thread Christian Schneider (JIRA)
Christian Schneider created ARIES-1881:
--

 Summary: Mongo based implementation
 Key: ARIES-1881
 URL: https://issues.apache.org/jira/browse/ARIES-1881
 Project: Aries
  Issue Type: New Feature
  Components: Journaled Events
Reporter: Christian Schneider
 Fix For: journaled-events-0.1.0






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] cschneider commented on issue #15: Journaled Event implementation based on MongoDB

2019-01-06 Thread GitBox
cschneider commented on issue #15: Journaled Event implementation based on 
MongoDB
URL: 
https://github.com/apache/aries-journaled-events/pull/15#issuecomment-451758216
 
 
   Looks good. I only saw some minor issues. We can work them out later.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] akrainiouk opened a new pull request #15: Journaled Event implementation based on MongoDB

2019-01-06 Thread GitBox
akrainiouk opened a new pull request #15: Journaled Event implementation based 
on MongoDB
URL: https://github.com/apache/aries-journaled-events/pull/15
 
 
   This is initial implementation of mongo journaled events. No unit tests yet 
and it is not tested, just compiles.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] cschneider commented on issue #14: Message interface replaced with concrete class.

2019-01-06 Thread GitBox
cschneider commented on issue #14: Message interface replaced with concrete 
class.
URL: 
https://github.com/apache/aries-journaled-events/pull/14#issuecomment-451750001
 
 
   Looks good


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] cschneider closed pull request #14: Message interface replaced with concrete class.

2019-01-06 Thread GitBox
cschneider closed pull request #14: Message interface replaced with concrete 
class.
URL: https://github.com/apache/aries-journaled-events/pull/14
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/org.apache.aries.events.api/src/main/java/org/apache/aries/events/api/Message.java
 
b/org.apache.aries.events.api/src/main/java/org/apache/aries/events/api/Message.java
index 13419ee..529c980 100644
--- 
a/org.apache.aries.events.api/src/main/java/org/apache/aries/events/api/Message.java
+++ 
b/org.apache.aries.events.api/src/main/java/org/apache/aries/events/api/Message.java
@@ -17,13 +17,30 @@
  */
 package org.apache.aries.events.api;
 
+import java.util.HashMap;
 import java.util.Map;
 
+import static java.util.Collections.unmodifiableMap;
+
 /**
  * TODO If we allow wild card consumption then a message also needs a topic
  */
-public interface Message {
-byte[] getPayload();
+public final class Message {
+
+private final byte[] payload;
+private final Map properties;
+
+public Message(byte[] payload, Map properties) {
+this.payload = payload.clone();
+this.properties = unmodifiableMap(new HashMap<>(properties));
+}
+
+public byte[] getPayload() {
+return payload.clone();
+}
 
-Map getProperties();
+public Map getProperties() {
+return properties;
+}
+
 }
diff --git 
a/org.apache.aries.events.api/src/main/java/org/apache/aries/events/api/Messaging.java
 
b/org.apache.aries.events.api/src/main/java/org/apache/aries/events/api/Messaging.java
index 2cd1138..bdef185 100644
--- 
a/org.apache.aries.events.api/src/main/java/org/apache/aries/events/api/Messaging.java
+++ 
b/org.apache.aries.events.api/src/main/java/org/apache/aries/events/api/Messaging.java
@@ -41,14 +41,6 @@
  */
 Subscription subscribe(String topic, Position position, Seek seek, 
Consumer callback);
 
-/**
- * Create a message with payload and metadata
- * @param payload
- * @param props
- * @return
- */
-Message newMessage(byte[] payload, Map props);
-
 /**
  * Deserialize the position from the string
  * 
diff --git 
a/org.apache.aries.events.memory/src/main/java/org/apache/aries/events/memory/InMemoryMessaging.java
 
b/org.apache.aries.events.memory/src/main/java/org/apache/aries/events/memory/InMemoryMessaging.java
index 8966c16..72d63c4 100644
--- 
a/org.apache.aries.events.memory/src/main/java/org/apache/aries/events/memory/InMemoryMessaging.java
+++ 
b/org.apache.aries.events.memory/src/main/java/org/apache/aries/events/memory/InMemoryMessaging.java
@@ -47,11 +47,6 @@ public Subscription subscribe(String topicName, Position 
position, Seek seek, Co
 return topic.subscribe(position, seek, callback);
 }
 
-@Override
-public Message newMessage(byte[] payload, Map props) {
-return new MemoryMessage(payload, props);
-}
-
 @Override
 public Position positionFromString(String position) {
 long offset = Long.parseLong(position);
diff --git 
a/org.apache.aries.events.memory/src/main/java/org/apache/aries/events/memory/MemoryMessage.java
 
b/org.apache.aries.events.memory/src/main/java/org/apache/aries/events/memory/MemoryMessage.java
deleted file mode 100644
index 77815ce..000
--- 
a/org.apache.aries.events.memory/src/main/java/org/apache/aries/events/memory/MemoryMessage.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The SF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package org.apache.aries.events.memory;
-
-import java.util.Map;
-
-import org.apache.aries.events.api.Message;
-
-class MemoryMessage implements Message {
-
-private byte[] payload;
-private Map properties;
-
-MemoryMessage(byte[] payload, Map props) {
-this.payload = payload;
-properties = props;
-}
-
-@Override
-public byte[] getPayload() {
-return this.payload;
-}
-
-@Override
-public Map getProperties() {
-return this.properties;
-}
-
-}
diff --git