You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2022/10/24 09:00:51 UTC

[incubator-eventmesh] branch protocol-amqp updated: 1. add mapping to manage relationship between models used in amqp

This is an automated email from the ASF dual-hosted git repository.

mikexue pushed a commit to branch protocol-amqp
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git


The following commit(s) were added to refs/heads/protocol-amqp by this push:
     new 5eb8d892 1. add mapping to manage relationship between models used in amqp
     new f3e109ac Merge pull request #1795 from jackyluo-learning/protocol-amqp-shadow4
5eb8d892 is described below

commit 5eb8d89257ceec03bece6b390051bc1d2ba9768d
Author: jackyluo <15...@qq.com>
AuthorDate: Mon Oct 24 11:01:40 2022 +0800

    1. add mapping to manage relationship between models used in amqp
---
 .../core/protocol/amqp/util/AmqpGlobalMapping.java | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/util/AmqpGlobalMapping.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/util/AmqpGlobalMapping.java
new file mode 100644
index 00000000..8caa6985
--- /dev/null
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/util/AmqpGlobalMapping.java
@@ -0,0 +1,38 @@
+package org.apache.eventmesh.runtime.core.protocol.amqp.util;
+
+import org.apache.eventmesh.runtime.core.protocol.amqp.consumer.AmqpConsumer;
+import org.apache.eventmesh.runtime.core.protocol.amqp.processor.AmqpChannel;
+import org.apache.eventmesh.runtime.core.protocol.amqp.processor.AmqpConnection;
+
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class AmqpGlobalMapping {
+
+    /**
+     * mapping between connection and channel
+     */
+    private ConcurrentHashMap<AmqpConnection, Set<AmqpChannel>> connection2ChannelMap;
+
+    /**
+     * mapping between queue and channel
+     */
+    private ConcurrentHashMap<String, Set<AmqpChannel>> queue2ChannelMap;
+
+    /**
+     * mapping between queue and consumer
+     */
+    private ConcurrentHashMap<String, Set<AmqpConsumer>> queue2ConsumerMap;
+
+    public ConcurrentHashMap<AmqpConnection, Set<AmqpChannel>> getConnection2ChannelMap() {
+        return connection2ChannelMap;
+    }
+
+    public ConcurrentHashMap<String, Set<AmqpChannel>> getQueue2ChannelMap() {
+        return queue2ChannelMap;
+    }
+
+    public ConcurrentHashMap<String, Set<AmqpConsumer>> getQueue2ConsumerMap() {
+        return queue2ConsumerMap;
+    }
+}
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org