This is an automated email from the ASF dual-hosted git repository.
mxsm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh.git
The following commit(s) were added to refs/heads/master by this push:
new ad7d80890 [ISSUE #4363] Do some code optimization.[EventMeshConsumer]
(#4362)
ad7d80890 is described below
commit ad7d80890b52e47ea33f172aebad13e01e2aaa73
Author: yanrongzhen <[email protected]>
AuthorDate: Tue Aug 15 16:31:42 2023 +0800
[ISSUE #4363] Do some code optimization.[EventMeshConsumer] (#4362)
* Code optimization for the EventMeshConsumer class.
* Fix several missing modifications.
---
.../runtime/core/protocol/grpc/consumer/EventMeshConsumer.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/consumer/EventMeshConsumer.java
b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/consumer/EventMeshConsumer.java
index 52f5c87f5..fa5929a8b 100644
---
a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/consumer/EventMeshConsumer.java
+++
b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/consumer/EventMeshConsumer.java
@@ -63,7 +63,7 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j
public class EventMeshConsumer {
- private final transient String consumerGroup;
+ private final String consumerGroup;
private final EventMeshGrpcServer eventMeshGrpcServer;
@@ -80,7 +80,7 @@ public class EventMeshConsumer {
/**
* Key: topic Value: ConsumerGroupTopicConfig
**/
- private final transient Map<String, ConsumerGroupTopicConfig>
consumerGroupTopicConfig = new ConcurrentHashMap<>();
+ private final Map<String, ConsumerGroupTopicConfig>
consumerGroupTopicConfig = new ConcurrentHashMap<>();
public EventMeshConsumer(final EventMeshGrpcServer eventMeshGrpcServer,
final String consumerGroup) {
this.eventMeshGrpcServer = eventMeshGrpcServer;
@@ -252,9 +252,9 @@ public class EventMeshConsumer {
final String topic = event.getSubject();
final String bizSeqNo = Optional.ofNullable(
(String)
event.getExtension(Constants.PROPERTY_MESSAGE_SEARCH_KEYS))
- .orElseGet(() -> "");
+ .orElse("");
final String uniqueId = Optional.ofNullable((String)
event.getExtension(Constants.RMB_UNIQ_ID))
- .orElseGet(() -> "");
+ .orElse("");
if (log.isDebugEnabled()) {
log.debug("message|mq2eventMesh|topic={}|msg={}", topic,
event);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]