[qpid-broker-j] 01/02: QPID-8472:[Broker-J]Improve operational logging for operations on queue

2020-10-14 Thread orudyy
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git

commit a419a7205a8d57d4780f97184e7765d138980b0a
Author: Dedeepya T 
AuthorDate: Tue Oct 13 13:07:47 2020 +0530

 QPID-8472:[Broker-J]Improve operational logging for operations on queue
---
 .../java/org/apache/qpid/server/model/Session.java |  30 +++
 .../apache/qpid/server/session/AMQPSession.java|   8 +
 .../qpid/server/session/AbstractAMQPSession.java   |  74 +++
 .../server/session/AbstractAMQPSessionTest.java| 214 +
 .../qpid/server/protocol/v0_10/ServerSession.java  |   9 +-
 .../qpid/server/protocol/v0_8/AMQChannel.java  |   4 +-
 .../v1_0/StandardReceivingLinkEndpoint.java|   4 +-
 7 files changed, 335 insertions(+), 8 deletions(-)

diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/model/Session.java 
b/broker-core/src/main/java/org/apache/qpid/server/model/Session.java
index 343e5ba..894df6a 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/Session.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/Session.java
@@ -65,4 +65,34 @@ public interface Session> extends 
ConfiguredObject
 changesConfiguredObjectState = false,
 skipAclCheck = true)
 Set> getConsumers();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.BYTES, label = "Inbound",
+description = "Total size of all messages received by this 
session.", metricName = "inbound_bytes_count")
+long getBytesIn();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.BYTES, label = "Outbound",
+description = "Total size of all messages delivered by this 
session.", metricName = "outbound_bytes_count")
+long getBytesOut();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.MESSAGES, label = "Inbound",
+description = "Total number of messages delivered by this 
session.", metricName = "inbound_messages_count")
+long getMessagesIn();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.MESSAGES, label = "Outbound",
+description = "Total number of messages received by this 
session.", metricName = "outbound_messages_count")
+long getMessagesOut();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.MESSAGES, label = "Transacted Inbound",
+description = "Total number of messages delivered by this session 
within a transaction.", metricName = "transacted_inbound_messages_count")
+long getTransactedMessagesIn();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.MESSAGES, label = "Transacted Outbound",
+description = "Total number of messages received by this session 
within a transaction.", metricName = "transacted_outbound_messages_count")
+long getTransactedMessagesOut();
 }
diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/session/AMQPSession.java 
b/broker-core/src/main/java/org/apache/qpid/server/session/AMQPSession.java
index 4603e22..1127214 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/session/AMQPSession.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/session/AMQPSession.java
@@ -93,4 +93,12 @@ public interface AMQPSession doOnIOThreadAsync(final Runnable task);
+
+void registerTransactedMessageReceived();
+
+void registerTransactedMessageDelivered();
+
+void registerMessageReceived(long size);
+
+void registerMessageDelivered(long size);
 }
diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/session/AbstractAMQPSession.java
 
b/broker-core/src/main/java/org/apache/qpid/server/session/AbstractAMQPSession.java
index 7256444..7928331 100644
--- 
a/broker-core/src/main/java/org/apache/qpid/server/session/AbstractAMQPSession.java
+++ 
b/broker-core/src/main/java/org/apache/qpid/server/session/AbstractAMQPSession.java
@@ -30,6 +30,7 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
 
 import javax.security.auth.Subject;
 
@@ -82,6 +83,13 @@ public abstract class AbstractAMQPSession,
 private Iterator _processPendingIterator;
 private final Set> _consumers = 
ConcurrentHashMap.newKeySet();
 
+private final AtomicLong _messagesIn = new AtomicLong();
+private final AtomicLong _messagesOut = new AtomicLong();
+private final AtomicLong _transactedMessagesIn = new AtomicLong();
+private fina

[qpid-broker-j] branch 7.1.x updated (d9914f0 -> fab70b0)

2020-10-14 Thread orudyy
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a change to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git.


from d9914f0  QPID-8472:[Broker-J]Improve operational logging for 
operations on queue
 new a419a72   QPID-8472:[Broker-J]Improve operational logging for 
operations on queue
 new fab70b0  QPID-8473:[Broker-J]Added operational logs for sender links

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../qpid/server/exchange/AbstractExchange.java |   9 +
 .../{BindingMessages.java => SenderMessages.java}  | 106 +++---
 .../logging/messages/Sender_logmessages.properties |   3 +-
 .../apache/qpid/server/model/PublishingLink.java   |   1 +
 .../java/org/apache/qpid/server/model/Session.java |  30 +++
 .../apache/qpid/server/queue/AbstractQueue.java|   9 +
 .../apache/qpid/server/session/AMQPSession.java|   8 +
 .../qpid/server/session/AbstractAMQPSession.java   |  74 +++
 .../server/session/AbstractAMQPSessionTest.java| 214 +
 .../qpid/server/protocol/v0_10/ServerSession.java  |   9 +-
 .../qpid/server/protocol/v0_8/AMQChannel.java  |   4 +-
 .../v1_0/StandardReceivingLinkEndpoint.java|   4 +-
 12 files changed, 378 insertions(+), 93 deletions(-)
 copy 
broker-core/src/main/java/org/apache/qpid/server/logging/messages/{BindingMessages.java
 => SenderMessages.java} (61%)
 copy joramtests/src/test/resources/jms-client/surefire.excludes => 
broker-core/src/main/java/org/apache/qpid/server/logging/messages/Sender_logmessages.properties
 (91%)
 create mode 100644 
broker-core/src/test/java/org/apache/qpid/server/session/AbstractAMQPSessionTest.java


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-broker-j] 02/02: QPID-8473:[Broker-J]Added operational logs for sender links

2020-10-14 Thread orudyy
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git

commit fab70b095a8f27fb7e81edb786a14f2435688d9a
Author: Dedeepya T 
AuthorDate: Tue Oct 13 12:44:16 2020 +0530

QPID-8473:[Broker-J]Added operational logs for sender links
---
 .../qpid/server/exchange/AbstractExchange.java |   9 +
 .../server/logging/messages/SenderMessages.java| 203 +
 .../logging/messages/Sender_logmessages.properties |  21 +++
 .../apache/qpid/server/model/PublishingLink.java   |   1 +
 .../apache/qpid/server/queue/AbstractQueue.java|   9 +
 5 files changed, 243 insertions(+)

diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
 
b/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
index c6a7a95..9600881 100644
--- 
a/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
+++ 
b/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
@@ -51,6 +51,7 @@ import org.apache.qpid.server.logging.EventLogger;
 import org.apache.qpid.server.logging.LogSubject;
 import org.apache.qpid.server.logging.messages.BindingMessages;
 import org.apache.qpid.server.logging.messages.ExchangeMessages;
+import org.apache.qpid.server.logging.messages.SenderMessages;
 import org.apache.qpid.server.logging.subjects.ExchangeLogSubject;
 import org.apache.qpid.server.message.InstanceProperties;
 import org.apache.qpid.server.message.MessageDestination;
@@ -1036,6 +1037,10 @@ public abstract class AbstractExchange>
 {
 _linkedSenders.put(sender, oldValue+1);
 }
+if( link.TYPE_LINK.equals(link.getType()))
+{
+getEventLogger().message(SenderMessages.CREATE(link.getName(), 
link.getDestination()));
+}
 }
 
 @Override
@@ -1046,6 +1051,10 @@ public abstract class AbstractExchange>
 {
 _linkedSenders.put(sender, oldValue-1);
 }
+if( link.TYPE_LINK.equals(link.getType()))
+{
+getEventLogger().message(SenderMessages.CLOSE(link.getName(), 
link.getDestination()));
+}
 }
 
 private void validateOrCreateAlternateBinding(final Exchange exchange, 
final boolean mayCreate)
diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/logging/messages/SenderMessages.java
 
b/broker-core/src/main/java/org/apache/qpid/server/logging/messages/SenderMessages.java
new file mode 100644
index 000..7be0283
--- /dev/null
+++ 
b/broker-core/src/main/java/org/apache/qpid/server/logging/messages/SenderMessages.java
@@ -0,0 +1,203 @@
+/*
+ *  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.qpid.server.logging.messages;
+
+import static 
org.apache.qpid.server.logging.AbstractMessageLogger.DEFAULT_LOG_HIERARCHY_PREFIX;
+
+import java.text.MessageFormat;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.slf4j.LoggerFactory;
+
+import org.apache.qpid.server.logging.LogMessage;
+
+/**
+ * DO NOT EDIT DIRECTLY, THIS FILE WAS GENERATED.
+ *
+ * Generated using GenerateLogMessages and LogMessages.vm
+ * This file is based on the content of Sender_logmessages.properties
+ *
+ * To regenerate, use Maven lifecycle generates-sources with -Dgenerate=true
+ */
+public class SenderMessages
+{
+private static ResourceBundle _messages;
+private static Locale _currentLocale;
+
+static
+{
+Locale locale = Locale.US;
+String localeSetting = System.getProperty("qpid.broker_locale");
+if (localeSetting != null)
+{
+String[] localeParts = localeSetting.split("_");
+String language = (localeParts.length > 0 ? localeParts[0] : "");
+String country = (localeParts.length > 1 ? localeParts[1] : "");
+String variant = "";
+if (localeParts.length > 2)
+{
+variant = localeSetting.substring(language.length() + 1 + 
country.length() + 1);
+}
+locale = new Locale(language, country, variant);
+}
+_currentLocale

[qpid-broker-j] branch 8.0.x updated (3f63055 -> 26e42d3)

2020-10-14 Thread orudyy
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a change to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git.


from 3f63055  QPID-8470: Added retrying logic for storing metadata
 new cd189a4   QPID-8472:[Broker-J]Improve operational logging for 
operations on queue
 new 26e42d3  QPID-8473:[Broker-J]Added operational logs for sender links

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../qpid/server/exchange/AbstractExchange.java |   9 +
 .../{BindingMessages.java => SenderMessages.java}  | 106 +++---
 .../logging/messages/Sender_logmessages.properties |   3 +-
 .../apache/qpid/server/model/PublishingLink.java   |   1 +
 .../java/org/apache/qpid/server/model/Session.java |  30 +++
 .../apache/qpid/server/queue/AbstractQueue.java|   9 +
 .../apache/qpid/server/session/AMQPSession.java|   8 +
 .../qpid/server/session/AbstractAMQPSession.java   |  74 +++
 .../server/session/AbstractAMQPSessionTest.java| 214 +
 .../qpid/server/protocol/v0_10/ServerSession.java  |   9 +-
 .../qpid/server/protocol/v0_8/AMQChannel.java  |   4 +-
 .../v1_0/StandardReceivingLinkEndpoint.java|   4 +-
 12 files changed, 378 insertions(+), 93 deletions(-)
 copy 
broker-core/src/main/java/org/apache/qpid/server/logging/messages/{BindingMessages.java
 => SenderMessages.java} (61%)
 copy joramtests/src/test/resources/jms-client/surefire.excludes => 
broker-core/src/main/java/org/apache/qpid/server/logging/messages/Sender_logmessages.properties
 (91%)
 create mode 100644 
broker-core/src/test/java/org/apache/qpid/server/session/AbstractAMQPSessionTest.java


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-broker-j] 02/02: QPID-8473:[Broker-J]Added operational logs for sender links

2020-10-14 Thread orudyy
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git

commit 26e42d3ccb40fe8d1f2d8779f2f337954d58e593
Author: Dedeepya T 
AuthorDate: Tue Oct 13 12:44:16 2020 +0530

QPID-8473:[Broker-J]Added operational logs for sender links
---
 .../qpid/server/exchange/AbstractExchange.java |   9 +
 .../server/logging/messages/SenderMessages.java| 203 +
 .../logging/messages/Sender_logmessages.properties |  21 +++
 .../apache/qpid/server/model/PublishingLink.java   |   1 +
 .../apache/qpid/server/queue/AbstractQueue.java|   9 +
 5 files changed, 243 insertions(+)

diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
 
b/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
index 26a1009..60fff56 100644
--- 
a/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
+++ 
b/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
@@ -51,6 +51,7 @@ import org.apache.qpid.server.logging.EventLogger;
 import org.apache.qpid.server.logging.LogSubject;
 import org.apache.qpid.server.logging.messages.BindingMessages;
 import org.apache.qpid.server.logging.messages.ExchangeMessages;
+import org.apache.qpid.server.logging.messages.SenderMessages;
 import org.apache.qpid.server.logging.subjects.ExchangeLogSubject;
 import org.apache.qpid.server.message.InstanceProperties;
 import org.apache.qpid.server.message.MessageDestination;
@@ -1036,6 +1037,10 @@ public abstract class AbstractExchange>
 {
 _linkedSenders.put(sender, oldValue+1);
 }
+if( link.TYPE_LINK.equals(link.getType()))
+{
+getEventLogger().message(SenderMessages.CREATE(link.getName(), 
link.getDestination()));
+}
 }
 
 @Override
@@ -1046,6 +1051,10 @@ public abstract class AbstractExchange>
 {
 _linkedSenders.put(sender, oldValue-1);
 }
+if( link.TYPE_LINK.equals(link.getType()))
+{
+getEventLogger().message(SenderMessages.CLOSE(link.getName(), 
link.getDestination()));
+}
 }
 
 private void validateOrCreateAlternateBinding(final Exchange exchange, 
final boolean mayCreate)
diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/logging/messages/SenderMessages.java
 
b/broker-core/src/main/java/org/apache/qpid/server/logging/messages/SenderMessages.java
new file mode 100644
index 000..7be0283
--- /dev/null
+++ 
b/broker-core/src/main/java/org/apache/qpid/server/logging/messages/SenderMessages.java
@@ -0,0 +1,203 @@
+/*
+ *  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.qpid.server.logging.messages;
+
+import static 
org.apache.qpid.server.logging.AbstractMessageLogger.DEFAULT_LOG_HIERARCHY_PREFIX;
+
+import java.text.MessageFormat;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.slf4j.LoggerFactory;
+
+import org.apache.qpid.server.logging.LogMessage;
+
+/**
+ * DO NOT EDIT DIRECTLY, THIS FILE WAS GENERATED.
+ *
+ * Generated using GenerateLogMessages and LogMessages.vm
+ * This file is based on the content of Sender_logmessages.properties
+ *
+ * To regenerate, use Maven lifecycle generates-sources with -Dgenerate=true
+ */
+public class SenderMessages
+{
+private static ResourceBundle _messages;
+private static Locale _currentLocale;
+
+static
+{
+Locale locale = Locale.US;
+String localeSetting = System.getProperty("qpid.broker_locale");
+if (localeSetting != null)
+{
+String[] localeParts = localeSetting.split("_");
+String language = (localeParts.length > 0 ? localeParts[0] : "");
+String country = (localeParts.length > 1 ? localeParts[1] : "");
+String variant = "";
+if (localeParts.length > 2)
+{
+variant = localeSetting.substring(language.length() + 1 + 
country.length() + 1);
+}
+locale = new Locale(language, country, variant);
+}
+_currentLocale

[qpid-broker-j] 01/02: QPID-8472:[Broker-J]Improve operational logging for operations on queue

2020-10-14 Thread orudyy
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git

commit cd189a4b6ca443c099910196973686ec6bc7cafa
Author: Dedeepya T 
AuthorDate: Tue Oct 13 13:07:47 2020 +0530

 QPID-8472:[Broker-J]Improve operational logging for operations on queue
---
 .../java/org/apache/qpid/server/model/Session.java |  30 +++
 .../apache/qpid/server/session/AMQPSession.java|   8 +
 .../qpid/server/session/AbstractAMQPSession.java   |  74 +++
 .../server/session/AbstractAMQPSessionTest.java| 214 +
 .../qpid/server/protocol/v0_10/ServerSession.java  |   9 +-
 .../qpid/server/protocol/v0_8/AMQChannel.java  |   4 +-
 .../v1_0/StandardReceivingLinkEndpoint.java|   4 +-
 7 files changed, 335 insertions(+), 8 deletions(-)

diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/model/Session.java 
b/broker-core/src/main/java/org/apache/qpid/server/model/Session.java
index 343e5ba..894df6a 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/Session.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/Session.java
@@ -65,4 +65,34 @@ public interface Session> extends 
ConfiguredObject
 changesConfiguredObjectState = false,
 skipAclCheck = true)
 Set> getConsumers();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.BYTES, label = "Inbound",
+description = "Total size of all messages received by this 
session.", metricName = "inbound_bytes_count")
+long getBytesIn();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.BYTES, label = "Outbound",
+description = "Total size of all messages delivered by this 
session.", metricName = "outbound_bytes_count")
+long getBytesOut();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.MESSAGES, label = "Inbound",
+description = "Total number of messages delivered by this 
session.", metricName = "inbound_messages_count")
+long getMessagesIn();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.MESSAGES, label = "Outbound",
+description = "Total number of messages received by this 
session.", metricName = "outbound_messages_count")
+long getMessagesOut();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.MESSAGES, label = "Transacted Inbound",
+description = "Total number of messages delivered by this session 
within a transaction.", metricName = "transacted_inbound_messages_count")
+long getTransactedMessagesIn();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.MESSAGES, label = "Transacted Outbound",
+description = "Total number of messages received by this session 
within a transaction.", metricName = "transacted_outbound_messages_count")
+long getTransactedMessagesOut();
 }
diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/session/AMQPSession.java 
b/broker-core/src/main/java/org/apache/qpid/server/session/AMQPSession.java
index 4603e22..1127214 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/session/AMQPSession.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/session/AMQPSession.java
@@ -93,4 +93,12 @@ public interface AMQPSession doOnIOThreadAsync(final Runnable task);
+
+void registerTransactedMessageReceived();
+
+void registerTransactedMessageDelivered();
+
+void registerMessageReceived(long size);
+
+void registerMessageDelivered(long size);
 }
diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/session/AbstractAMQPSession.java
 
b/broker-core/src/main/java/org/apache/qpid/server/session/AbstractAMQPSession.java
index 7256444..7928331 100644
--- 
a/broker-core/src/main/java/org/apache/qpid/server/session/AbstractAMQPSession.java
+++ 
b/broker-core/src/main/java/org/apache/qpid/server/session/AbstractAMQPSession.java
@@ -30,6 +30,7 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
 
 import javax.security.auth.Subject;
 
@@ -82,6 +83,13 @@ public abstract class AbstractAMQPSession,
 private Iterator _processPendingIterator;
 private final Set> _consumers = 
ConcurrentHashMap.newKeySet();
 
+private final AtomicLong _messagesIn = new AtomicLong();
+private final AtomicLong _messagesOut = new AtomicLong();
+private final AtomicLong _transactedMessagesIn = new AtomicLong();
+private fina

[qpid-broker-j] branch master updated (4f86157 -> fdaa194)

2020-10-14 Thread orudyy
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git.


from 4f86157  QPID-8469: [Broker-J][Message Store] The message is already 
cleaned when the delete listener is called
 new fb83241  QPID-8472:[Broker-J]Improve operational logging for 
operations on queue
 new fdaa194  QPID-8473:[Broker-J]Added operational logs for sender links

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../qpid/server/exchange/AbstractExchange.java |   9 +
 .../{BindingMessages.java => SenderMessages.java}  | 106 +++---
 .../logging/messages/Sender_logmessages.properties |   3 +-
 .../apache/qpid/server/model/PublishingLink.java   |   1 +
 .../java/org/apache/qpid/server/model/Session.java |  30 +++
 .../apache/qpid/server/queue/AbstractQueue.java|   9 +
 .../apache/qpid/server/session/AMQPSession.java|   8 +
 .../qpid/server/session/AbstractAMQPSession.java   |  74 +++
 .../server/session/AbstractAMQPSessionTest.java| 214 +
 .../qpid/server/protocol/v0_10/ServerSession.java  |   9 +-
 .../qpid/server/protocol/v0_8/AMQChannel.java  |   4 +-
 .../v1_0/StandardReceivingLinkEndpoint.java|   4 +-
 12 files changed, 378 insertions(+), 93 deletions(-)
 copy 
broker-core/src/main/java/org/apache/qpid/server/logging/messages/{BindingMessages.java
 => SenderMessages.java} (61%)
 copy joramtests/src/test/resources/jms-client/surefire.excludes => 
broker-core/src/main/java/org/apache/qpid/server/logging/messages/Sender_logmessages.properties
 (91%)
 create mode 100644 
broker-core/src/test/java/org/apache/qpid/server/session/AbstractAMQPSessionTest.java


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-broker-j] 02/02: QPID-8473:[Broker-J]Added operational logs for sender links

2020-10-14 Thread orudyy
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git

commit fdaa194f30ee16520956ecd2e8120a317d30c7e5
Author: Dedeepya T 
AuthorDate: Tue Oct 13 12:44:16 2020 +0530

QPID-8473:[Broker-J]Added operational logs for sender links

This closes #66
---
 .../qpid/server/exchange/AbstractExchange.java |   9 +
 .../server/logging/messages/SenderMessages.java| 203 +
 .../logging/messages/Sender_logmessages.properties |  21 +++
 .../apache/qpid/server/model/PublishingLink.java   |   1 +
 .../apache/qpid/server/queue/AbstractQueue.java|   9 +
 5 files changed, 243 insertions(+)

diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
 
b/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
index 26a1009..60fff56 100644
--- 
a/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
+++ 
b/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
@@ -51,6 +51,7 @@ import org.apache.qpid.server.logging.EventLogger;
 import org.apache.qpid.server.logging.LogSubject;
 import org.apache.qpid.server.logging.messages.BindingMessages;
 import org.apache.qpid.server.logging.messages.ExchangeMessages;
+import org.apache.qpid.server.logging.messages.SenderMessages;
 import org.apache.qpid.server.logging.subjects.ExchangeLogSubject;
 import org.apache.qpid.server.message.InstanceProperties;
 import org.apache.qpid.server.message.MessageDestination;
@@ -1036,6 +1037,10 @@ public abstract class AbstractExchange>
 {
 _linkedSenders.put(sender, oldValue+1);
 }
+if( link.TYPE_LINK.equals(link.getType()))
+{
+getEventLogger().message(SenderMessages.CREATE(link.getName(), 
link.getDestination()));
+}
 }
 
 @Override
@@ -1046,6 +1051,10 @@ public abstract class AbstractExchange>
 {
 _linkedSenders.put(sender, oldValue-1);
 }
+if( link.TYPE_LINK.equals(link.getType()))
+{
+getEventLogger().message(SenderMessages.CLOSE(link.getName(), 
link.getDestination()));
+}
 }
 
 private void validateOrCreateAlternateBinding(final Exchange exchange, 
final boolean mayCreate)
diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/logging/messages/SenderMessages.java
 
b/broker-core/src/main/java/org/apache/qpid/server/logging/messages/SenderMessages.java
new file mode 100644
index 000..7be0283
--- /dev/null
+++ 
b/broker-core/src/main/java/org/apache/qpid/server/logging/messages/SenderMessages.java
@@ -0,0 +1,203 @@
+/*
+ *  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.qpid.server.logging.messages;
+
+import static 
org.apache.qpid.server.logging.AbstractMessageLogger.DEFAULT_LOG_HIERARCHY_PREFIX;
+
+import java.text.MessageFormat;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.slf4j.LoggerFactory;
+
+import org.apache.qpid.server.logging.LogMessage;
+
+/**
+ * DO NOT EDIT DIRECTLY, THIS FILE WAS GENERATED.
+ *
+ * Generated using GenerateLogMessages and LogMessages.vm
+ * This file is based on the content of Sender_logmessages.properties
+ *
+ * To regenerate, use Maven lifecycle generates-sources with -Dgenerate=true
+ */
+public class SenderMessages
+{
+private static ResourceBundle _messages;
+private static Locale _currentLocale;
+
+static
+{
+Locale locale = Locale.US;
+String localeSetting = System.getProperty("qpid.broker_locale");
+if (localeSetting != null)
+{
+String[] localeParts = localeSetting.split("_");
+String language = (localeParts.length > 0 ? localeParts[0] : "");
+String country = (localeParts.length > 1 ? localeParts[1] : "");
+String variant = "";
+if (localeParts.length > 2)
+{
+variant = localeSetting.substring(language.length() + 1 + 
country.length() + 1);
+}
+locale = new Locale(language, country, variant);
+   

[qpid-broker-j] 01/02: QPID-8472:[Broker-J]Improve operational logging for operations on queue

2020-10-14 Thread orudyy
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git

commit fb83241276d37f171d20460bd1c36e9c966e5a3f
Author: Dedeepya T 
AuthorDate: Tue Oct 13 13:07:47 2020 +0530

QPID-8472:[Broker-J]Improve operational logging for operations on queue

This closes #65
---
 .../java/org/apache/qpid/server/model/Session.java |  30 +++
 .../apache/qpid/server/session/AMQPSession.java|   8 +
 .../qpid/server/session/AbstractAMQPSession.java   |  74 +++
 .../server/session/AbstractAMQPSessionTest.java| 214 +
 .../qpid/server/protocol/v0_10/ServerSession.java  |   9 +-
 .../qpid/server/protocol/v0_8/AMQChannel.java  |   4 +-
 .../v1_0/StandardReceivingLinkEndpoint.java|   4 +-
 7 files changed, 335 insertions(+), 8 deletions(-)

diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/model/Session.java 
b/broker-core/src/main/java/org/apache/qpid/server/model/Session.java
index 343e5ba..894df6a 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/Session.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/Session.java
@@ -65,4 +65,34 @@ public interface Session> extends 
ConfiguredObject
 changesConfiguredObjectState = false,
 skipAclCheck = true)
 Set> getConsumers();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.BYTES, label = "Inbound",
+description = "Total size of all messages received by this 
session.", metricName = "inbound_bytes_count")
+long getBytesIn();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.BYTES, label = "Outbound",
+description = "Total size of all messages delivered by this 
session.", metricName = "outbound_bytes_count")
+long getBytesOut();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.MESSAGES, label = "Inbound",
+description = "Total number of messages delivered by this 
session.", metricName = "inbound_messages_count")
+long getMessagesIn();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.MESSAGES, label = "Outbound",
+description = "Total number of messages received by this 
session.", metricName = "outbound_messages_count")
+long getMessagesOut();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.MESSAGES, label = "Transacted Inbound",
+description = "Total number of messages delivered by this session 
within a transaction.", metricName = "transacted_inbound_messages_count")
+long getTransactedMessagesIn();
+
+@SuppressWarnings("unused")
+@ManagedStatistic(statisticType = StatisticType.CUMULATIVE, units = 
StatisticUnit.MESSAGES, label = "Transacted Outbound",
+description = "Total number of messages received by this session 
within a transaction.", metricName = "transacted_outbound_messages_count")
+long getTransactedMessagesOut();
 }
diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/session/AMQPSession.java 
b/broker-core/src/main/java/org/apache/qpid/server/session/AMQPSession.java
index 4603e22..1127214 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/session/AMQPSession.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/session/AMQPSession.java
@@ -93,4 +93,12 @@ public interface AMQPSession doOnIOThreadAsync(final Runnable task);
+
+void registerTransactedMessageReceived();
+
+void registerTransactedMessageDelivered();
+
+void registerMessageReceived(long size);
+
+void registerMessageDelivered(long size);
 }
diff --git 
a/broker-core/src/main/java/org/apache/qpid/server/session/AbstractAMQPSession.java
 
b/broker-core/src/main/java/org/apache/qpid/server/session/AbstractAMQPSession.java
index 7256444..7928331 100644
--- 
a/broker-core/src/main/java/org/apache/qpid/server/session/AbstractAMQPSession.java
+++ 
b/broker-core/src/main/java/org/apache/qpid/server/session/AbstractAMQPSession.java
@@ -30,6 +30,7 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
 
 import javax.security.auth.Subject;
 
@@ -82,6 +83,13 @@ public abstract class AbstractAMQPSession,
 private Iterator _processPendingIterator;
 private final Set> _consumers = 
ConcurrentHashMap.newKeySet();
 
+private final AtomicLong _messagesIn = new AtomicLong();
+private final AtomicLong _messagesOut = new AtomicLong();
+private final AtomicLong _transactedMessagesIn = new Atomic

[qpid-dispatch] branch dev-protocol-adaptors-2 updated: NO-JIRA: Assert offset vs. body_data_buffer_count only when offset nonzero.

2020-10-14 Thread chug
This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch dev-protocol-adaptors-2
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/dev-protocol-adaptors-2 by 
this push:
 new e9b5dc7  NO-JIRA: Assert offset vs. body_data_buffer_count only when 
offset nonzero.
e9b5dc7 is described below

commit e9b5dc7551e79a8163f00a2bcabeb0ea421868db
Author: Chuck Rolke 
AuthorDate: Wed Oct 14 11:27:11 2020 -0400

NO-JIRA: Assert offset vs. body_data_buffer_count only when offset nonzero.

Prevents offset=0 and buffer_count=0 asserts.
---
 src/message.c | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/message.c b/src/message.c
index 2894086..9d3c5c5 100644
--- a/src/message.c
+++ b/src/message.c
@@ -2435,12 +2435,14 @@ int qd_message_body_data_buffers(qd_message_body_data_t 
*body_data, pn_raw_buffe
 //
 // Skip the buffer offset
 //
-assert(offset < qd_message_body_data_buffer_count(body_data));
-while (offset > 0 && payload_len > 0) {
-payload_len -= qd_buffer_size(buffer) - data_offset;
-offset--;
-data_offset = 0;
-buffer = DEQ_NEXT(buffer);
+if (offset > 0) {
+assert(offset < qd_message_body_data_buffer_count(body_data));
+while (offset > 0 && payload_len > 0) {
+payload_len -= qd_buffer_size(buffer) - data_offset;
+offset--;
+data_offset = 0;
+buffer = DEQ_NEXT(buffer);
+}
 }
 
 //


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-proton-j] branch master updated: PROTON-2284: track half-open sender and receiver links seperately to resolve upon peer attach

2020-10-14 Thread robbie
This is an automated email from the ASF dual-hosted git repository.

robbie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton-j.git


The following commit(s) were added to refs/heads/master by this push:
 new 754d40e  PROTON-2284: track half-open sender and receiver links 
seperately to resolve upon peer attach
754d40e is described below

commit 754d40e2a2e58aab7a252d933daef6d572f9f508
Author: Robbie Gemmell 
AuthorDate: Wed Oct 14 16:21:47 2020 +0100

PROTON-2284: track half-open sender and receiver links seperately to 
resolve upon peer attach
---
 .../qpid/proton/engine/impl/TransportImpl.java |   8 +-
 .../qpid/proton/engine/impl/TransportSession.java  |  25 +-
 .../qpid/proton/engine/impl/TransportImplTest.java | 304 -
 3 files changed, 328 insertions(+), 9 deletions(-)

diff --git 
a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java 
b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
index 7307aff..aa30496 100644
--- 
a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
+++ 
b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
@@ -800,11 +800,12 @@ public class TransportImpl extends EndpointImpl
 && !transportLink.isLocalHandleSet()) || 
link.getRemoteState() == EndpointState.UNINITIALIZED)
 {
 
+Role role = endpoint instanceof ReceiverImpl ? 
Role.RECEIVER : Role.SENDER;
 UnsignedInteger localHandle = 
transportSession.allocateLocalHandle(transportLink);
 
 if(link.getRemoteState() == 
EndpointState.UNINITIALIZED)
 {
-
transportSession.addHalfOpenLink(transportLink);
+
transportSession.addHalfOpenLink(transportLink, Role.SENDER == role);
 }
 
 Attach attach = new Attach();
@@ -851,7 +852,7 @@ public class TransportImpl extends EndpointImpl
 
attach.setMaxMessageSize(link.getMaxMessageSize());
 }
 
-attach.setRole(endpoint instanceof ReceiverImpl ? 
Role.RECEIVER : Role.SENDER);
+attach.setRole(role);
 
 if(link instanceof SenderImpl)
 {
@@ -1268,7 +1269,8 @@ public class TransportImpl extends EndpointImpl
 }
 else
 {
-transportLink = 
transportSession.resolveHalfOpenLink(attach.getName());
+// We flip the peer role to determine our local role, and try 
to resolve an existing half-open link
+transportLink = 
transportSession.resolveHalfOpenLink(attach.getName(), Role.RECEIVER == 
attach.getRole());
 if(transportLink == null)
 {
 
diff --git 
a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportSession.java
 
b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportSession.java
index e473675..0bab291 100644
--- 
a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportSession.java
+++ 
b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportSession.java
@@ -54,7 +54,8 @@ class TransportSession
 
 private final Map> _remoteHandlesMap = 
new HashMap>();
 private final Map> _localHandlesMap = 
new HashMap>();
-private final Map _halfOpenLinks = new 
HashMap();
+private final Map _halfOpenSenderLinks = new 
HashMap();
+private final Map _halfOpenReceiverLinks = new 
HashMap();
 
 
 private UnsignedInteger _incomingDeliveryId = null;
@@ -251,14 +252,28 @@ class TransportSession
 _remoteHandlesMap.remove(handle);
 }
 
-public TransportLink resolveHalfOpenLink(String name)
+public TransportLink resolveHalfOpenLink(String name, boolean isSender)
 {
-return _halfOpenLinks.remove(name);
+if(isSender)
+{
+return _halfOpenSenderLinks.remove(name);
+}
+else
+{
+return _halfOpenReceiverLinks.remove(name);
+}
 }
 
-public void addHalfOpenLink(TransportLink link)
+public void addHalfOpenLink(TransportLink link, boolean isSender)
 {
-_halfOpenLinks.put(link.getName(), link);
+if(isSender)
+{
+_halfOpenSenderLinks.put(link.getName(), link);
+}
+else
+{
+_halfOpenReceiverLinks.put(link.getName(), link);
+}
 }
 
 public void handleTransfer(Transfer transfer, Binary payload)
diff --git 
a/proton-j/src/test/java/org/apache/qpid/proton/engine/impl/TransportImplTest.java
 
b/proton-j/src/test/java/org/apache/qpid/proton/engine/impl/TransportImplTest.java
index 5217421..a40da89 100644
--- 
a/proton-j/src/

[qpid-dispatch] branch dev-protocol-adaptors-2 updated: DISPATCH-1743: Invoked nghttp2_session_send() right after passing the bytes to nghttp2 so that some callbacks are called that might have been mi

2020-10-14 Thread gmurthy
This is an automated email from the ASF dual-hosted git repository.

gmurthy pushed a commit to branch dev-protocol-adaptors-2
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/dev-protocol-adaptors-2 by 
this push:
 new 256402a  DISPATCH-1743: Invoked nghttp2_session_send() right after 
passing the bytes to nghttp2 so that some callbacks are called that might have 
been missed
256402a is described below

commit 256402a99cdb10e4b88c410d13e7991691f69eea
Author: Ganesh Murthy 
AuthorDate: Wed Oct 14 11:07:49 2020 -0400

DISPATCH-1743: Invoked nghttp2_session_send() right after passing the bytes 
to nghttp2 so that some callbacks are called that might have been missed
---
 src/adaptors/http2/http2_adaptor.c | 16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/adaptors/http2/http2_adaptor.c 
b/src/adaptors/http2/http2_adaptor.c
index 0d2ed94..e92e7a8 100644
--- a/src/adaptors/http2/http2_adaptor.c
+++ b/src/adaptors/http2/http2_adaptor.c
@@ -716,9 +716,6 @@ static int on_frame_recv_callback(nghttp2_session *session,
 int32_t stream_id = frame->hd.stream_id;
 qdr_http2_stream_data_t *stream_data = 
nghttp2_session_get_stream_user_data(session_data->session, stream_id);
 
-if (!stream_data)
-return 0;
-
 switch (frame->hd.type) {
 case NGHTTP2_PRIORITY: {
 qd_log(http2_adaptor->protocol_log_source, QD_LOG_TRACE, 
"[C%i][S%"PRId32"] HTTP2 PRIORITY frame received", conn->conn_id, stream_id);
@@ -732,6 +729,10 @@ static int on_frame_recv_callback(nghttp2_session *session,
 qd_log(http2_adaptor->protocol_log_source, QD_LOG_TRACE, 
"[C%i][S%"PRId32"] HTTP2 WINDOW_UPDATE frame received", conn->conn_id, 
stream_id);
 break;
 case NGHTTP2_DATA: {
+
+if (!stream_data)
+return 0;
+
 qd_log(http2_adaptor->protocol_log_source, QD_LOG_TRACE, 
"[C%i][S%"PRId32"] NGHTTP2_DATA frame received", conn->conn_id, stream_id);
 
 if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
@@ -765,6 +766,8 @@ static int on_frame_recv_callback(nghttp2_session *session,
 break;
 case NGHTTP2_HEADERS:
 case NGHTTP2_CONTINUATION: {
+if (!stream_data)
+return 0;
 if (frame->hd.type == NGHTTP2_CONTINUATION) {
 qd_log(http2_adaptor->protocol_log_source, QD_LOG_TRACE, 
"[C%i][S%"PRId32"] HTTP2 CONTINUATION frame received", conn->conn_id, 
stream_id);
 }
@@ -1546,7 +1549,7 @@ static int handle_incoming_http(qdr_http2_connection_t 
*conn)
 qd_http2_buffer_insert(buf, raw_buff_size);
 count += raw_buff_size;
 DEQ_INSERT_TAIL(buffers, buf);
-qd_log(http2_adaptor->log_source, QD_LOG_DEBUG, "[C%i] - 
handle_incoming_http - Inserting qd_http2_buffer of size %"PRIu32" ", 
conn->conn_id, raw_buff_size);
+qd_log(http2_adaptor->log_source, QD_LOG_DEBUG, "[C%i] 
handle_incoming_http - Inserting qd_http2_buffer of size %"PRIu32" ", 
conn->conn_id, raw_buff_size);
 }
 }
 
@@ -1560,6 +1563,7 @@ static int handle_incoming_http(qdr_http2_connection_t 
*conn)
 while (buf) {
 size_t http2_buffer_size = qd_http2_buffer_size(buf);
 if (http2_buffer_size > 0) {
+qd_log(http2_adaptor->log_source, QD_LOG_DEBUG, "[C%i] 
handle_incoming_http - Calling nghttp2_session_mem_recv qd_http2_buffer of size 
%"PRIu32" ", conn->conn_id, http2_buffer_size);
 rv = nghttp2_session_mem_recv(conn->session_data->session, 
qd_http2_buffer_base(buf), qd_http2_buffer_size(buf));
 if (rv < 0) {
 qd_log(http2_adaptor->protocol_log_source, QD_LOG_ERROR, 
"[C%i] Error in nghttp2_session_mem_recv rv=%i", conn->conn_id, rv);
@@ -1588,6 +1592,8 @@ static int handle_incoming_http(qdr_http2_connection_t 
*conn)
 if (rv > 0)
 grant_read_buffers(conn);
 
+nghttp2_session_send(conn-> session_data->session);
+
 return count;
 }
 
@@ -1831,8 +1837,8 @@ static void handle_connection_event(pn_event_t *e, 
qd_server_t *qd_server, void
 switch (pn_event_type(e)) {
 case PN_RAW_CONNECTION_CONNECTED: {
 if (conn->ingress) {
-send_settings_frame(conn);
 qdr_http_connection_ingress_accept(conn);
+send_settings_frame(conn);
 qd_log(log, QD_LOG_INFO, "[C%i] Accepted Ingress 
((PN_RAW_CONNECTION_CONNECTED)) from %s", conn->conn_id, conn->remote_address);
 } else {
 qd_log(log, QD_LOG_INFO, "[C%i] Connected Egress 
(PN_RAW_CONNECTION_CONNECTED), thread_id=%i", conn->conn_id, pthread_self());


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-dispatch] branch dev-protocol-adaptors-2 created (now d5863a5)

2020-10-14 Thread kgiusti
This is an automated email from the ASF dual-hosted git repository.

kgiusti pushed a change to branch dev-protocol-adaptors-2
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git.


  at d5863a5  NO-JIRA: ignore async warning in http2_server.py

This branch includes the following new commits:

 new 31de05a  Dataplane: Moved protocol-adapter functions from 
router_core.h into proto_adaptor.h
 new a9aa776  Dataplane: Re-factored direct-AMQP to use the 
protocol-adaptor interface.
 new 51370c7  Dataplane: Exposed the protocol name with the connection 
entity.
 new 8b0f673  Dataplane: Improved sasl-plain test by using symbolic 
attribute names, not positional indices.
 new ec68791  Dataplane: Added adaptor plugin capability. Started first 
reference adaptor (TCP).
 new 3dbef23  Dataplane: Added documentation for the protocol adaptor 
callbacks.
 new 5f5aff3  Dataplane: Removed old handler call which is not used anymore.
 new c7ce538  Dataplane: minor cleanup
 new ed01562  Dataplane: Added setter for dynamic in qdr_terminus_t
 new 13ecaea  Dataplane: Renamed tcp_adaptor to reference_adaptor. Added 
more test content to the reference adaptor. It now sends messages to a fixed 
address. Fixed qdr_terminus_format to show the dynamically-assigned address for 
dynamis termini.
 new 0ca2214  Dataplane: connection-activate is now routed through the 
protocol adapter that handles the connection.
 new 86dbe00  Dataplane: Updated the reference adaptor to implement 
connection activation
 new 7db1ece  Dataplane: Fixed order problem in shutting down the router. 
Disabled the reference adaptor by default (uncomment the last line to 
re-enable). The reference adaptor causes test failures.
 new f16016a  Dataplane: Added a 5th message compose variant to provide: - 
optional properties - optional application-properties - optional body in the 
form of a buffer list - indication of receive-complete
 new 7bce87f  Dataplane: Changed the new compose function to have only one 
field for headers. This field can have both properties and application 
properties. It's more efficient put together like this.
 new 9f5a143  Dataplane: Added message method to set send-complete. Added 
reference code to receive messages (non streamed).
 new f9c0118  Dataplane: Exposed access to connection-ids from server. 
Moved the generation of the "connection opened" log from router_node.c to the 
core module. This causes the log to be raised for all protocol adaptors.
 new cc0ab09  Dataplane: Added calls in message.h for streaming putput from 
adaptors. Renamed qdr_deliver_continue* to qdr_delivery_continue*
 new 657e4e6  Dataplane: Set proper buffer refcount in messages during 
buffer-extend. This ensures that the streaming buffers are properly freed when 
no longer needed.
 new 0e190a6  Dataplane: Updates to the message-extend (return buffer count 
for flow control). Added bidirectional streaming test to ref adaptor.
 new 24c062d  Dataplane: Added API for streaming data out of messages. This 
commit adds the requirement for Proton raw-connection support.
 new 6eafd3f  Dataplane: Added no_route and initial_delivery on 
link-first-attach.
 new 4ae0d00  Dataplane: (from gsim) Implementation of qd_message_read_body.
 new 935fd34  Dataplane: Added implementation of qd_message_release_body.
 new c9be351  Dataplane - Added qd_buffer_list_append function to 
efficiently accumulate data in buffer lists.
 new 53bc66f  Dataplane: WIP changes
 new aabc896  Dataplane: Message parsing bug fixed: now properly handles 
empty var-length fields.
 new 9091007  Dataplane: Fixed message parsing so it can handle partial and 
streaming content.
 new dbbda08  Dataplane: disabled reference adaptor
 new 0ba4d27  Dataplane: WIP
 new e1c4fd3  Dataplane - Added the body_data data structure for reading 
streaming messages. WIP - The following functions (in message.c) need to be 
implemented: find_last_buffer qd_message_body_data_iterator 
qd_message_body_data_buffer_count qd_message_body_data_buffers 
qd_message_body_data_release
 new 220aace  DISPATCH-1742 Dataplane: Fixups from rebase to master.
 new cbb79a4  DISPATCH-1742: Added receive_complete parameter to 
qd_message_compose_3() and qd_message_compose_3() in message.c
 new 1a0c43a  DISPATCH-1743 - Introduce a HTTP/2 Adapter. This adaptor will 
act as the HTTP/2 <-->AMQP bridge
 new 0187dc8  DISPATCH-1742 - Completed implementation of outbound 
streaming path
 new 010f472  DISPATCH-1742 - Fixed compilation error
 new 646990a  DISPATCH-1744: refactor common HTTP code
 new 1b881d1  DISPATCH-1742 - Removed compiler warning by initializing a 
boolean value.
 new 3ed1d46  DISPATCH-1742 - Handle zero-length body sections.  Fixed a 
bug in body content length calculation.
 new 63277fe  DISPATCH-1744: Fixed minor error in field name
 new 301f2a1  DISPATCH-1

[qpid-dispatch] branch dev-protocol-adaptors updated: NO-JIRA: fix RelWithDebInfo build issue

2020-10-14 Thread kgiusti
This is an automated email from the ASF dual-hosted git repository.

kgiusti pushed a commit to branch dev-protocol-adaptors
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/dev-protocol-adaptors by this 
push:
 new bc88172  NO-JIRA: fix RelWithDebInfo build issue
bc88172 is described below

commit bc88172b5e220d5eca32a4809dd258722ae2b465
Author: Kenneth Giusti 
AuthorDate: Wed Oct 14 09:23:55 2020 -0400

NO-JIRA: fix RelWithDebInfo build issue
---
 tests/message_test.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/message_test.c b/tests/message_test.c
index 135adc8..1e33143 100644
--- a/tests/message_test.c
+++ b/tests/message_test.c
@@ -791,10 +791,10 @@ static char *check_body_data(char *s_chunk_size, char 
*s_n_chunks, bool flatten)
 // flatten if required
 if (flatten) {
 // check that the flatten buffer is big enough
-int vbin_size = chunk_size > 511 ? 8 : 5;  // per-chunk vbin 
descriptor overhead
-int header_size = 100; // leave plenty of 
allocaton for header
-int msg_size = n_chunks * (chunk_size + vbin_size) + header_size;
-assert(msg_size < FLAT_BUF_SIZE);
+assert(FLAT_BUF_SIZE > (n_chunks * (chunk_size
+// per-chunk vbin descriptor 
overhead:
++ (chunk_size > 511 ? 8 : 5))
++ 100));  // leave plenty of allocaton for 
header
 
 // compress message into flatten buffer
 size_t flat_size = flatten_bufs(MSG_CONTENT(msg));


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org