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 02:22:33 UTC

[incubator-eventmesh] branch protocol-amqp updated: 1. add config in EventMeshAmqpConfiguration.java 2. fix bug in AmqpChannel

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 6d9e6a03 1. add config in EventMeshAmqpConfiguration.java 2. fix bug in AmqpChannel
     new 8390bd01 Merge pull request #1789 from jackyluo-learning/protocol-amqp-shadow1
6d9e6a03 is described below

commit 6d9e6a0349d1ec4c085cde834ec2b93d2bac6844
Author: jackyluo <15...@qq.com>
AuthorDate: Mon Oct 24 09:41:09 2022 +0800

    1. add config in EventMeshAmqpConfiguration.java
    2. fix bug in AmqpChannel
---
 .../runtime/configuration/EventMeshAmqpConfiguration.java | 15 +++++++++++++++
 .../runtime/core/protocol/amqp/processor/AmqpChannel.java |  2 +-
 .../runtime/core/protocol/amqp/processor/AmqpHandler.java |  3 +++
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/configuration/EventMeshAmqpConfiguration.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/configuration/EventMeshAmqpConfiguration.java
index f3352dd9..3f786c88 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/configuration/EventMeshAmqpConfiguration.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/configuration/EventMeshAmqpConfiguration.java
@@ -37,6 +37,21 @@ public class EventMeshAmqpConfiguration extends CommonConfiguration {
      */
     public int maxFrameSize = 4096;
 
+    /**
+     * default max number of channels
+     */
+    public int maxNoOfChannels = 64;
+
+    /**
+     * default heart beat
+     */
+    public int heartBeat = 60 * 1000;
+
+    /**
+     * default max message size
+     */
+    public long maxMessageSize = 1024 * 1024 * 10;
+
     public EventMeshAmqpConfiguration(ConfigurationWrapper configurationWrapper) {
         super(configurationWrapper);
     }
diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/processor/AmqpChannel.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/processor/AmqpChannel.java
index 72e4df73..90520284 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/processor/AmqpChannel.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/processor/AmqpChannel.java
@@ -101,7 +101,7 @@ public class AmqpChannel implements ChannelMethodProcessor {
     public AmqpChannel(int channelId, AmqpConnection connection) {
         this.channelId = channelId;
         this.connection = connection;
-        this.amqpServer = connection.getAmqpService();
+        this.amqpServer = connection.getAmqpServer();
         this.exchangeService = amqpServer.getExchangeService();
         this.queueService = amqpServer.getQueueService();
         this.amqpConfiguration = amqpServer.getEventMeshAmqpConfiguration();
diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/processor/AmqpHandler.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/processor/AmqpHandler.java
index a04dc01d..f6ff010c 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/processor/AmqpHandler.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/amqp/processor/AmqpHandler.java
@@ -393,4 +393,7 @@ public abstract class AmqpHandler extends ChannelInboundHandlerAdapter implement
         return ctx;
     }
 
+    public EventMeshAmqpServer getAmqpServer() {
+        return amqpServer;
+    }
 }


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