You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2018/04/17 19:11:02 UTC
[1/4] activemq-artemis git commit: This closes #2026
Repository: activemq-artemis
Updated Branches:
refs/heads/master 98da402fb -> ec9882c55
This closes #2026
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/ec9882c5
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/ec9882c5
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/ec9882c5
Branch: refs/heads/master
Commit: ec9882c553ecfc4f8251851ae27ddb758ba1ef8c
Parents: 98da402 31baba1
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Apr 17 15:10:15 2018 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Apr 17 15:10:15 2018 -0400
----------------------------------------------------------------------
.travis.yml | 6 +-
.../src/test/scripts/run-examples.sh | 1 +
.../jms/example/VirtualTopicMappingExample.java | 61 ++++++++++----------
3 files changed, 36 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
[2/4] activemq-artemis git commit: NO-JIRA fixing checkstyle on
virtual topic mapping example
Posted by cl...@apache.org.
NO-JIRA fixing checkstyle on virtual topic mapping example
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/186bc446
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/186bc446
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/186bc446
Branch: refs/heads/master
Commit: 186bc4464caa86d89600a16006766c9b2b4c502b
Parents: 1f4e7be
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Apr 17 13:55:04 2018 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Apr 17 15:10:15 2018 -0400
----------------------------------------------------------------------
.../jms/example/VirtualTopicMappingExample.java | 61 ++++++++++----------
1 file changed, 30 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/186bc446/examples/protocols/openwire/virtual-topic-mapping/src/main/java/org/apache/activemq/artemis/jms/example/VirtualTopicMappingExample.java
----------------------------------------------------------------------
diff --git a/examples/protocols/openwire/virtual-topic-mapping/src/main/java/org/apache/activemq/artemis/jms/example/VirtualTopicMappingExample.java b/examples/protocols/openwire/virtual-topic-mapping/src/main/java/org/apache/activemq/artemis/jms/example/VirtualTopicMappingExample.java
index 0d0e271..eff7b18 100644
--- a/examples/protocols/openwire/virtual-topic-mapping/src/main/java/org/apache/activemq/artemis/jms/example/VirtualTopicMappingExample.java
+++ b/examples/protocols/openwire/virtual-topic-mapping/src/main/java/org/apache/activemq/artemis/jms/example/VirtualTopicMappingExample.java
@@ -35,42 +35,41 @@ import org.apache.activemq.ActiveMQConnectionFactory;
*/
public class VirtualTopicMappingExample {
- public static void main(final String[] args) throws Exception {
- Connection connection = null;
- try {
+ public static void main(final String[] args) throws Exception {
+ Connection connection = null;
+ try {
- ConnectionFactory cf = new ActiveMQConnectionFactory();
+ ConnectionFactory cf = new ActiveMQConnectionFactory();
- connection = cf.createConnection();
- Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ connection = cf.createConnection();
+ Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- //create consumer on queue that is used by the Virtual Topic
- Queue queue = session.createQueue("Consumer.A.VirtualTopic.Orders");
- MessageConsumer messageConsumer = session.createConsumer(queue);
- connection.start();
+ //create consumer on queue that is used by the Virtual Topic
+ Queue queue = session.createQueue("Consumer.A.VirtualTopic.Orders");
+ MessageConsumer messageConsumer = session.createConsumer(queue);
+ connection.start();
+ //send message to virtual topic
+ Topic topic = session.createTopic("VirtualTopic.Orders");
+ MessageProducer producer = session.createProducer(topic);
+ TextMessage message = session.createTextMessage("This is a text message");
+ producer.send(message);
- //send message to virtual topic
- Topic topic = session.createTopic("VirtualTopic.Orders");
- MessageProducer producer = session.createProducer(topic);
- TextMessage message = session.createTextMessage("This is a text message");
- producer.send(message);
+ System.out.println("Sent message with ID: " + message.getJMSMessageID() + " to Topic: " + topic.getTopicName());
- System.out.println("Sent message with ID: " + message.getJMSMessageID() + " to Topic: " + topic.getTopicName());
+ //consume the message from the backing queue
+ TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);
- //consume the message from the backing queue
- TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);
-
- if (messageReceived != null) {
- System.out.println("Received message with ID: " + messageReceived.getJMSMessageID() + " from Queue: " + queue.getQueueName());
- } else {
- //unexpected outcome
- throw new RuntimeException("EXAMPLE FAILED - No message received from Queue: " + queue.getQueueName());
- }
- } finally {
- if (connection != null) {
- connection.close();
- }
- }
- }
+ if (messageReceived != null) {
+ System.out.println("Received message with ID: " + messageReceived.getJMSMessageID() + " from Queue: " + queue.getQueueName());
+ } else {
+ //unexpected outcome
+ throw new RuntimeException("EXAMPLE FAILED - No message received from Queue: " + queue.getQueueName());
+ }
+ } finally {
+ if (connection != null) {
+ connection.close();
+ }
+ }
+ }
}
[4/4] activemq-artemis git commit: NO-JIRA Adding examples
verification into travis
Posted by cl...@apache.org.
NO-JIRA Adding examples verification into travis
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/1f4e7be0
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/1f4e7be0
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/1f4e7be0
Branch: refs/heads/master
Commit: 1f4e7be0079cb8f8d0a03b0ce404c25f82068f3c
Parents: 98da402
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Apr 17 13:47:21 2018 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Apr 17 15:10:15 2018 -0400
----------------------------------------------------------------------
.travis.yml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/1f4e7be0/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 582754c..9244f85 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,7 +7,11 @@ before_install: rm -rf $HOME/.m2/repository/org/apache/activemq/artemis-*
# use 'install' so smoke-tests will work
# use '-Pextra-tests' to ensure extra-tests compiles even though they won't actually run
-script: mvn -Pfast-tests -Pextra-tests -B install
+script:
+- set -e
+- mvn -Pfast-tests -Pextra-tests -B install -q
+- cd examples
+- mvn install -Prelease install -B -q
cache:
directories:
[3/4] activemq-artemis git commit: NO-JIRA Adding example to
run-examples.sh
Posted by cl...@apache.org.
NO-JIRA Adding example to run-examples.sh
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/31baba1e
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/31baba1e
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/31baba1e
Branch: refs/heads/master
Commit: 31baba1e16d8ba7c5828259db24fde92cf11f587
Parents: 186bc44
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Apr 17 13:59:53 2018 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Apr 17 15:10:15 2018 -0400
----------------------------------------------------------------------
artemis-distribution/src/test/scripts/run-examples.sh | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/31baba1e/artemis-distribution/src/test/scripts/run-examples.sh
----------------------------------------------------------------------
diff --git a/artemis-distribution/src/test/scripts/run-examples.sh b/artemis-distribution/src/test/scripts/run-examples.sh
index cb13980..e0051c0 100755
--- a/artemis-distribution/src/test/scripts/run-examples.sh
+++ b/artemis-distribution/src/test/scripts/run-examples.sh
@@ -157,6 +157,7 @@ cd $ARTEMIS_HOME/examples/protocols/openwire/
cd queue; mvn verify; cd ..
cd message-listener; mvn verify; cd ..
cd message-recovery; mvn verify; cd ..
+cd virtual-topic-mapping; mvn verify; cd ..
cd $ARTEMIS_HOME/examples/protocols/stomp/