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/09/27 11:29:56 UTC
[incubator-eventmesh] branch protocol-amqp updated: 1. define management of queue. 2. define a service that manage meta model.
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 7feef49e 1. define management of queue. 2. define a service that manage meta model.
new 28b3bfca Merge pull request #1441 from jackyluo-learning/amqp12
7feef49e is described below
commit 7feef49e8480b292702d89a8ea5a1ea7096a08ae
Author: jackyluo <ja...@webank.com>
AuthorDate: Tue Sep 27 16:22:38 2022 +0800
1. define management of queue.
2. define a service that manage meta model.
---
.../core/protocol/amqp/MetaMessageService.java | 35 +++++++++++++++++++
.../runtime/core/protocol/amqp/QueueContainer.java | 39 ++++++++++++++++++++++
.../runtime/core/protocol/amqp/QueueService.java | 24 +++++++++++++
3 files changed, 98 insertions(+)
diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/MetaMessageService.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/MetaMessageService.java
new file mode 100644
index 00000000..347b5826
--- /dev/null
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/MetaMessageService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.runtime.core.protocol.amqp;
+
+import lombok.Getter;
+
+/**
+ * a service that manage meta message, including the exchange, queue and vhost related to a single connection
+ */
+public class MetaMessageService {
+ @Getter
+ private ExchangeContainer exchangeContainer;
+ @Getter
+ private QueueContainer queueContainer;
+ @Getter
+ private ExchangeService exchangeService;
+ @Getter
+ private QueueService queueService;
+
+}
\ No newline at end of file
diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/QueueContainer.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/QueueContainer.java
new file mode 100644
index 00000000..c908ea84
--- /dev/null
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/QueueContainer.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.runtime.core.protocol.amqp;
+
+import org.apache.eventmesh.runtime.core.protocol.amqp.remoting.MetaModels.AmqpQueue;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * manage all queues used in the server
+ */
+public class QueueContainer {
+ private ExchangeContainer exchangeContainer;
+
+ private Map<VirtualHost, Map<String, AmqpQueue>> queueMap;
+
+ public QueueContainer(ExchangeContainer exchangeContainer) {
+ this.exchangeContainer = exchangeContainer;
+ this.queueMap = new ConcurrentHashMap<>();
+ }
+
+
+}
\ No newline at end of file
diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/QueueService.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/QueueService.java
new file mode 100644
index 00000000..b4c40367
--- /dev/null
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/QueueService.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.runtime.core.protocol.amqp;
+
+/**
+ * provide services to use QueueContainer
+ */
+public class QueueService {
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org