File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
client/src/main/java/org/apache/rocketmq/client
common/src/main/java/org/apache/rocketmq/common/utils
example/src/main/java/org/apache/rocketmq/example/ordermessage Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ public void setInstanceName(String instanceName) {
94
94
95
95
public void changeInstanceNameToPID () {
96
96
if (this .instanceName .equals ("DEFAULT" )) {
97
- this .instanceName = UtilAll .getPid ()+ "#" + System .nanoTime ();
97
+ this .instanceName = UtilAll .getPid () + "#" + System .nanoTime ();
98
98
}
99
99
}
100
100
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public static String parseInstanceIdFromEndpoint(String endpoint) {
34
34
if (StringUtils .isEmpty (endpoint )) {
35
35
return null ;
36
36
}
37
- return endpoint .substring (endpoint .lastIndexOf ("/" )+ 1 , endpoint .indexOf ('.' ));
37
+ return endpoint .substring (endpoint .lastIndexOf ("/" ) + 1 , endpoint .indexOf ('.' ));
38
38
}
39
39
40
40
public static String getNameSrvAddrFromNamesrvEndpoint (String nameSrvEndpoint ) {
Original file line number Diff line number Diff line change 16
16
*/
17
17
package org .apache .rocketmq .example .ordermessage ;
18
18
19
- import java .io .UnsupportedEncodingException ;
20
- import java .util .List ;
21
19
import org .apache .rocketmq .client .exception .MQBrokerException ;
22
20
import org .apache .rocketmq .client .exception .MQClientException ;
23
21
import org .apache .rocketmq .client .producer .DefaultMQProducer ;
24
- import org .apache .rocketmq .client .producer .MQProducer ;
25
22
import org .apache .rocketmq .client .producer .MessageQueueSelector ;
26
23
import org .apache .rocketmq .client .producer .SendResult ;
27
24
import org .apache .rocketmq .common .message .Message ;
28
25
import org .apache .rocketmq .common .message .MessageQueue ;
29
26
import org .apache .rocketmq .remoting .common .RemotingHelper ;
30
27
import org .apache .rocketmq .remoting .exception .RemotingException ;
31
28
29
+ import java .io .UnsupportedEncodingException ;
30
+ import java .util .List ;
31
+
32
32
public class Producer {
33
33
public static void main (String [] args ) throws UnsupportedEncodingException {
34
34
try {
You can’t perform that action at this time.
0 commit comments