Skip to content

Commit caae6f8

Browse files
committed
Remove clientid and groupid from jmstrace
1 parent 8794852 commit caae6f8

File tree

2 files changed

+4
-39
lines changed

2 files changed

+4
-39
lines changed

smallrye-reactive-messaging-jms/src/main/java/io/smallrye/reactive/messaging/jms/tracing/JmsAttributesExtractor.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,7 @@ public JmsAttributesExtractor() {
1919

2020
@Override
2121
public void onStart(final AttributesBuilder attributes, final Context parentContext, final JmsTrace jmsTrace) {
22-
String groupId = jmsTrace.getGroupId();
23-
String clientId = jmsTrace.getClientId();
24-
if (groupId != null && clientId != null) {
25-
String consumerId = groupId;
26-
if (!clientId.isEmpty()) {
27-
consumerId += " - " + clientId;
28-
}
29-
attributes.put(MESSAGING_CLIENT_ID, consumerId);
30-
}
22+
3123
}
3224

3325
@Override
@@ -97,10 +89,7 @@ public Long getMessageEnvelopeSize(JmsTrace jmsTrace) {
9789

9890
@Override
9991
public String getClientId(JmsTrace jmsTrace) {
100-
if (jmsTrace.getClientId() == null) {
101-
return null;
102-
}
103-
return jmsTrace.getClientId();
92+
return null;
10493
}
10594

10695
@Override

smallrye-reactive-messaging-jms/src/main/java/io/smallrye/reactive/messaging/jms/tracing/JmsTrace.java

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,14 @@
44
import java.util.Map;
55

66
public class JmsTrace {
7-
private final String groupId;
8-
private final String clientId;
97
private final String queue;
108
private final Map<String, Object> messageProperties;
119

12-
private JmsTrace(final String groupId, final String clientId, final String queue, Map<String, Object> messageProperties) {
13-
this.groupId = groupId;
14-
this.clientId = clientId;
10+
private JmsTrace(final String queue, Map<String, Object> messageProperties) {
1511
this.queue = queue;
1612
this.messageProperties = messageProperties;
1713
}
1814

19-
public String getGroupId() {
20-
return groupId;
21-
}
22-
23-
public String getClientId() {
24-
return clientId;
25-
}
26-
2715
public String getQueue() {
2816
return queue;
2917
}
@@ -33,21 +21,9 @@ public Map<String, Object> getMessageProperties() {
3321
}
3422

3523
public static class Builder {
36-
private String groupId;
37-
private String clientId;
3824
private String queue;
3925
private Map<String, Object> properties;
4026

41-
public Builder withGroupId(final String groupId) {
42-
this.groupId = groupId;
43-
return this;
44-
}
45-
46-
public Builder withClientId(final String clientId) {
47-
this.clientId = clientId;
48-
return this;
49-
}
50-
5127
public Builder withQueue(final String queue) {
5228
this.queue = queue;
5329
return this;
@@ -59,7 +35,7 @@ public Builder withProperties(Map<String, Object> properties) {
5935
}
6036

6137
public JmsTrace build() {
62-
return new JmsTrace(groupId, clientId, queue, properties);
38+
return new JmsTrace(queue, properties);
6339
}
6440
}
6541
}

0 commit comments

Comments
 (0)