Skip to content

Commit abf5b53

Browse files
committed
Release rocketmq-jms 1.0.0 version
0 parents  commit abf5b53

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+5017
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# RocketMQ Externals
2+
3+
There are some RocketMQ external projects, with the purpose of growing the RocketMQ community.
4+
5+
## RocketMQ-Console-Ng
6+
A console for RocketMQ
7+
8+
## RocketMQ-JMS
9+
RocketMQ-JMS is an implement of JMS specification,taking Apache RocketMQ as broker. Now we are on the way of supporting JMS 1.1 and JMS2.0 is our final target.
10+
11+
## RocketMQ-Flume-Ng
12+
13+
This project is used to receive and send messages between
14+
[RocketMQ](http://rocketmq.incubator.apache.org/) and [Flume-ng](https://github.com/apache/flume)
15+
16+
1. Firstly, please get familiar with [RocketMQ](http://rocketmq.incubator.apache.org/) and [Flume-ng](https://github.com/apache/flume).
17+
2. Ensure that the jar related to [RocketMQ](http://rocketmq.incubator.apache.org/dowloading/releases) exists in local maven repository.
18+
3. Execute the following command in rocketmq-flume root directory
19+
20+
`mvn clean install dependency:copy-dependencies`
21+
22+
4. Copy the jar depended by rocketmq-flume to `$FLUME_HOME/lib`(the specific jar will be given later)
23+
24+
25+
## RocketMQ-Spark
26+
27+
Apache Spark-Streaming integration with RocketMQ. Both push & pull consumer mode are provided.
28+
For more details please refer to rocketmq-spark README.md.
29+
30+
## RocketMQ-Docker
31+
Apache RocketMQ Docker provides Dockerfile and bash scripts for building and running docker image.
32+

rocketmq-jms/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.idea/
2+
*.iml
3+
*.ipr
4+
*.iws
5+
target/

rocketmq-jms/.travis.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
notifications:
2+
email:
3+
recipients:
4+
- zhangke.huangshan@gmail.com
5+
- zhendongliu92@gmail.com
6+
on_success: change
7+
on_failure: always
8+
9+
language: java
10+
11+
matrix:
12+
include:
13+
# On OSX, run with default JDK only.
14+
# - os: osx
15+
# On Linux, run with specific JDKs only.
16+
# - os: linux
17+
# env: CUSTOM_JDK="oraclejdk8"
18+
- os: linux
19+
env: CUSTOM_JDK="oraclejdk7"
20+
#- os: linux
21+
# env: CUSTOM_JDK="openjdk7"
22+
23+
before_install:
24+
- echo 'MAVEN_OPTS="$MAVEN_OPTS -Xmx1024m -XX:MaxPermSize=512m -XX:+BytecodeVerificationLocal"' >> ~/.mavenrc
25+
- cat ~/.mavenrc
26+
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export JAVA_HOME=$(/usr/libexec/java_home); fi
27+
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then jdk_switcher use "$CUSTOM_JDK"; fi
28+
29+
#os:
30+
# - linux
31+
# - osx
32+
#jdk:
33+
# - oraclejdk8
34+
# - oraclejdk7
35+
# - openjdk7
36+
37+
38+
script:
39+
- travis_retry mvn -B clean install jacoco:report coveralls:report
40+
41+
#after_success:
42+
# - mvn clean install
43+
# - mvn sonar:sonar

rocketmq-jms/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# RocketMQ-JMS [![Build Status](https://travis-ci.org/rocketmq/rocketmq-jms.svg?branch=master)](https://travis-ci.org/rocketmq/rocketmq-jms) [![Coverage Status](https://coveralls.io/repos/github/rocketmq/rocketmq-jms/badge.svg?branch=master)](https://coveralls.io/github/rocketmq/rocketmq-jms?branch=master)
2+
3+
4+
## Introduction
5+
RocketMQ-JMS is an implement of JMS specification,taking Apache RocketMQ as broker.
6+
Now we are on the way of supporting JMS 1.1 and JMS2.0 is our final target.
7+
8+
Now RocketMQ-JMS will release the first version soon, and new features will be developed on the branch "v1.1".
9+
Please visit the [issue board](https://github.com/rocketmq/rocketmq-jms/issues) to see features in next version.
10+
11+
12+
## Building
13+
14+
> cd rocketmq-jms
15+
> mvn clean install
16+
17+
**run unit test:**
18+
> mvn test
19+
20+
**run integration test:**
21+
> mvn verify
22+
23+
**see jacoco code coverage report**
24+
> open core/target/site/jacoco/index.html
25+
> open core/target/site/jacoco-it/index.html
26+
> open spring/target/site/jacoco-it/index.html
27+
28+
29+
## Guidelines
30+
31+
Please see [Coding Guidelines Introduction](http://rocketmq.apache.org/docs/code-guidelines/)

rocketmq-jms/core/pom.xml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Licensed to the Apache Software Foundation (ASF) under one or more
4+
~ contributor license agreements. See the NOTICE file distributed with
5+
~ this work for additional information regarding copyright ownership.
6+
~ The ASF licenses this file to You under the Apache License, Version 2.0
7+
~ (the "License"); you may not use this file except in compliance with
8+
~ the License. You may obtain a copy of the License at
9+
~
10+
~ http://www.apache.org/licenses/LICENSE-2.0
11+
~
12+
~ Unless required by applicable law or agreed to in writing, software
13+
~ distributed under the License is distributed on an "AS IS" BASIS,
14+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
~ See the License for the specific language governing permissions and
16+
~ limitations under the License.
17+
-->
18+
19+
<project xmlns="http://maven.apache.org/POM/4.0.0"
20+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22+
<parent>
23+
<artifactId>rocketmq-jms-all</artifactId>
24+
<groupId>org.apache.rocketmq</groupId>
25+
<version>1.0.0</version>
26+
</parent>
27+
<modelVersion>4.0.0</modelVersion>
28+
29+
<artifactId>rocketmq-jms</artifactId>
30+
<version>1.0.0</version>
31+
32+
33+
<build>
34+
<plugins>
35+
<plugin>
36+
<groupId>org.apache.maven.plugins</groupId>
37+
<artifactId>maven-jar-plugin</artifactId>
38+
<executions>
39+
<execution>
40+
<goals>
41+
<goal>test-jar</goal>
42+
</goals>
43+
</execution>
44+
</executions>
45+
</plugin>
46+
</plugins>
47+
</build>
48+
</project>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.rocketmq.jms.domain;
19+
20+
public interface CommonConstant {
21+
22+
String PRODUCERID = "producerId";
23+
24+
String CONSUMERID = "consumerId";
25+
26+
String PROVIDER = "provider";
27+
28+
String NAMESERVER = "nameServer";
29+
30+
String INSTANCE_NAME = "instanceName";
31+
32+
String CONSUME_THREAD_NUMS = "consumeThreadNums";
33+
34+
String SEND_TIMEOUT_MILLIS = "sendMsgTimeoutMillis";
35+
36+
}
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.rocketmq.jms.domain;
19+
20+
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
21+
import org.apache.commons.lang.builder.ToStringStyle;
22+
23+
public class CommonContext {
24+
private String accessKey;
25+
private String secretKey;
26+
27+
private String consumerId;
28+
private String producerId;
29+
30+
private String provider;
31+
32+
private String appId;
33+
34+
private String nameServer;
35+
36+
/**
37+
* MQType
38+
*/
39+
private String mqType;
40+
41+
/**
42+
* Using for distinguishing client jvm process
43+
*/
44+
private String instanceName;
45+
/**
46+
* Set consumer threadPool Size
47+
*/
48+
private int consumeThreadNums;
49+
/**
50+
* Set send message timeOut
51+
*/
52+
private int sendMsgTimeoutMillis = -1;
53+
54+
/**
55+
* @return the appId
56+
*/
57+
public String getAppId() {
58+
return appId;
59+
}
60+
61+
/**
62+
* @param appId the appId to set
63+
*/
64+
public void setAppId(String appId) {
65+
this.appId = appId;
66+
}
67+
68+
/**
69+
* @return the provider
70+
*/
71+
public String getProvider() {
72+
return provider;
73+
}
74+
75+
/**
76+
* @param provider the provider to set
77+
*/
78+
public void setProvider(String provider) {
79+
this.provider = provider;
80+
}
81+
82+
/**
83+
* @return the instanceName
84+
*/
85+
public String getInstanceName() {
86+
return instanceName;
87+
}
88+
89+
/**
90+
* @param instanceName the instanceName to set
91+
*/
92+
public void setInstanceName(String instanceName) {
93+
this.instanceName = instanceName;
94+
}
95+
96+
/**
97+
* @return the accessKey
98+
*/
99+
public String getAccessKey() {
100+
return accessKey;
101+
}
102+
103+
/**
104+
* @param accessKey the accessKey to set
105+
*/
106+
public void setAccessKey(String accessKey) {
107+
this.accessKey = accessKey;
108+
}
109+
110+
/**
111+
* @return the secretKey
112+
*/
113+
public String getSecretKey() {
114+
return secretKey;
115+
}
116+
117+
/**
118+
* @param secretKey the secretKey to set
119+
*/
120+
public void setSecretKey(String secretKey) {
121+
this.secretKey = secretKey;
122+
}
123+
124+
/**
125+
* @return consumer thread nums
126+
*/
127+
public int getConsumeThreadNums() {
128+
return consumeThreadNums;
129+
}
130+
131+
/**
132+
* @param consumeThreadNums
133+
*/
134+
public void setConsumeThreadNums(int consumeThreadNums) {
135+
this.consumeThreadNums = consumeThreadNums;
136+
}
137+
138+
public String getConsumerId() {
139+
return consumerId;
140+
}
141+
142+
public void setConsumerId(String consumerId) {
143+
this.consumerId = consumerId;
144+
}
145+
146+
public String getProducerId() {
147+
return producerId;
148+
}
149+
150+
public void setProducerId(String producerId) {
151+
this.producerId = producerId;
152+
}
153+
154+
public int getSendMsgTimeoutMillis() {
155+
return sendMsgTimeoutMillis;
156+
}
157+
158+
public void setSendMsgTimeoutMillis(int sendMsgTimeoutMillis) {
159+
this.sendMsgTimeoutMillis = sendMsgTimeoutMillis;
160+
}
161+
162+
public String getMqType() {
163+
return mqType;
164+
}
165+
166+
public void setMqType(String mqType) {
167+
this.mqType = mqType;
168+
}
169+
170+
public String getNameServer() {
171+
return nameServer;
172+
}
173+
174+
public void setNameServer(String nameServer) {
175+
this.nameServer = nameServer;
176+
}
177+
178+
@Override
179+
public String toString() {
180+
return ReflectionToStringBuilder.toString(this, ToStringStyle.DEFAULT_STYLE);
181+
}
182+
183+
}

0 commit comments

Comments
 (0)