Merge "Issue #1814: Baseline qpid 0.18 configuration and 0.18 java client Merge local virtualHosts.xml back in with SLC change" into development

Former-commit-id: a43becec4f [formerly c7dd6365d2] [formerly 7b8931ed16] [formerly 3239c176fa [formerly 7b8931ed16 [formerly a1839a82cf0ef4460fd260cbbc3cc5ea0f0e5155]]]
Former-commit-id: 3239c176fa
Former-commit-id: 796dc63ca754008f87cdac9906820fb992597f43 [formerly 911a371329]
Former-commit-id: 516bb024bb
This commit is contained in:
Richard Peter 2013-03-25 14:45:06 -05:00 committed by Gerrit Code Review
commit 25263a5042
18 changed files with 333 additions and 91 deletions

View file

@ -2,8 +2,7 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="lib" path="backport-util-concurrent-2.2.jar"/>
<classpathentry exported="true" kind="lib" path="qpid-client-0.7.jar" sourcepath="qpid-client-0.7-src.zip"/>
<classpathentry exported="true" kind="lib" path="qpid-common-0.7.jar" sourcepath="qpid-common-0.7-src.zip"/>
<classpathentry exported="true" kind="lib" path="qpid-client-0.18.jar" sourcepath="qpid-client-0.18-sources.jar"/>
<classpathentry exported="true" kind="lib" path="qpid-common-0.18.jar" sourcepath="qpid-common-0.18-sources.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -2,38 +2,31 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Qpid
Bundle-SymbolicName: org.apache.qpid
Bundle-Version: 1.0.0.7
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.apache.log4j;bundle-version="1.0.0",
javax.jms;bundle-version="1.0.0",
org.apache.mina;bundle-version="1.0.0",
org.apache.commons.beanutils;bundle-version="1.8.0",
org.apache.commons.collections;bundle-version="3.2.0",
org.apache.commons.codec;bundle-version="1.3",
org.apache.commons.lang;bundle-version="2.2",
Bundle-Version: 1.0.0.18
Require-Bundle: javax.jms;bundle-version="1.0.0",
org.slf4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-BuddyPolicy: registered, ext, global
Bundle-ClassPath: qpid-client-0.7.jar,
qpid-common-0.7.jar,
backport-util-concurrent-2.2.jar
Bundle-ClassPath: qpid-client-0.18.jar,
qpid-common-0.18.jar
Export-Package: org.apache.qpid,
org.apache.qpid.api,
org.apache.qpid.client,
org.apache.qpid.client.failover,
org.apache.qpid.client.filter,
org.apache.qpid.client.handler,
org.apache.qpid.client.message,
org.apache.qpid.client.messaging.address,
org.apache.qpid.client.protocol,
org.apache.qpid.client.security,
org.apache.qpid.client.security.amqplain,
org.apache.qpid.client.security.anonymous,
org.apache.qpid.client.security.crammd5hashed,
org.apache.qpid.client.state,
org.apache.qpid.client.state.listener,
org.apache.qpid.client.transport,
org.apache.qpid.client.url,
org.apache.qpid.client.util,
org.apache.qpid.client.vmbroker,
org.apache.qpid.codec,
org.apache.qpid.common,
org.apache.qpid.configuration,
@ -44,26 +37,28 @@ Export-Package: org.apache.qpid,
org.apache.qpid.framing,
org.apache.qpid.framing.abstraction,
org.apache.qpid.framing.amqp_0_9,
org.apache.qpid.framing.amqp_0_91,
org.apache.qpid.framing.amqp_8_0,
org.apache.qpid.jms,
org.apache.qpid.jms.failover,
org.apache.qpid.jndi,
org.apache.qpid.naming,
org.apache.qpid.messaging,
org.apache.qpid.messaging.util,
org.apache.qpid.nclient,
org.apache.qpid.nclient.util,
org.apache.qpid.njms,
org.apache.qpid.pool,
org.apache.qpid.properties,
org.apache.qpid.protocol,
org.apache.qpid.security,
org.apache.qpid.ssl,
org.apache.qpid.thread,
org.apache.qpid.transport,
org.apache.qpid.transport.codec,
org.apache.qpid.transport.network,
org.apache.qpid.transport.network.io,
org.apache.qpid.transport.network.mina,
org.apache.qpid.transport.network.nio,
org.apache.qpid.transport.network.security,
org.apache.qpid.transport.network.security.sasl,
org.apache.qpid.transport.network.security.ssl,
org.apache.qpid.transport.util,
org.apache.qpid.url,
org.apache.qpid.util,
org.apache.qpid.util.concurrent
org.apache.qpid.util

View file

@ -1,4 +1,3 @@
bin.includes = META-INF/,\
qpid-client-0.7.jar,\
qpid-common-0.7.jar,\
backport-util-concurrent-2.2.jar
qpid-client-0.18.jar,\
qpid-common-0.18.jar

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -136,9 +136,20 @@
<constructor-arg type="java.lang.String" value="amqp://guest:guest@gfeNotify/edex?brokerlist='tcp://${broker.addr}?retries='9999'&amp;connecttimeout='5000'&amp;connectdelay='5000''&amp;maxprefetch='0'&amp;sync_publish='all'&amp;sync_ack='true'"/>
</bean>
<bean id="gfeNotifyPooledConnectionFactory" class="com.raytheon.uf.common.jms.JmsPooledConnectionFactory">
<constructor-arg ref="gfeNotifyConnectionFactory"/>
<property name="provider" value="QPID"/>
<property name="reconnectInterval" value="5000"/>
<!-- After connection has been closed by thread keep it allocated for another 90 seconds in case thread needs it again -->
<property name="connectionHoldTime" value="90000"/>
<!-- Any resource that has been available in the pool for more than 1 minute will be closed -->
<property name="resourceRetention" value="60000"/>
<property name="maxSpareConnections" value="10"/>
</bean>
<bean id="gfeNotifyJmsConfig" class="org.apache.camel.component.jms.JmsConfiguration"
factory-bean="jmsConfig" factory-method="copy">
<property name="listenerConnectionFactory" ref="gfeNotifyConnectionFactory" />
<property name="listenerConnectionFactory" ref="gfeNotifyPooledConnectionFactory" />
</bean>
<bean id="gfeNotifyThreadPool"

View file

@ -17,15 +17,43 @@
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
# further licensing information.
##
from qmf.console import Session
##
# Returns the client ids of all connections established to qpid.
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 03/21/13 1814 rjpeter Updated to use rest API for java broker
##
import httplib
import json
def getConnections(brokerHost):
sess = Session()
broker = sess.addBroker("amqp://quest/quest@" + brokerHost + ":5672")
sessions = sess.getObjects(_class="session", _package="org.apache.qpid.broker")
result = []
for s in sessions:
result.append(s.name)
sess.delBroker(broker)
return result
def getConnections(brokerHost, port=8180):
# Use rest services to pull connection clientId
# http://cp1f:9090/rest/connection
# port needs to be passed as a parameter
# parse json response for clientId, recommend using a hash of some kind
if (port is None):
httpConn = httplib.HTTPConnection(brokerHost)
else:
httpConn = httplib.HTTPConnection(brokerHost, port)
httpConn.connect()
httpConn.request("GET", "/rest/connection/edex")
response = httpConn.getresponse()
if (response.status != 200):
raise Exception("Unable to post request to server")
jsonStr = response.read()
jsonObjArray = json.loads(jsonStr)
resultSet = set()
for statDict in jsonObjArray:
clientId = statDict.get("clientId")
if clientId:
resultSet.add(clientId)
return list(resultSet)

View file

@ -37,7 +37,7 @@ import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
**/
/**
* TODO Add Description
* Repacks all point data hdf5 files.
*
* <pre>
*
@ -45,9 +45,9 @@ import com.raytheon.uf.edex.pointdata.PointDataPluginDao;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 1, 2011 njensen Initial creation
* Jan 14, 2013 1469 bkowal Removed the hdf5 data directory
*
* Nov 1, 2011 njensen Initial creation
* Jan 14, 2013 1469 bkowal Removed the hdf5 data directory
* Mar 21, 2013 1814 rjpeter Fixed logging of exception.
* </pre>
*
* @author njensen
@ -79,7 +79,8 @@ public class DataStoreRepacker {
try {
ds.repack(compression);
} catch (StorageException e) {
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage());
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
e);
}
}
// TODO change log statement if more than pointdata is hooked into this

View file

@ -1,22 +1,32 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
- This software was developed and / or modified by Raytheon Company,
- pursuant to Contract DG133W-05-CQ-1067 with the US Government.
-
- 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
- U.S. EXPORT CONTROLLED TECHNICAL DATA
- This software product contains export-restricted data whose
- export/transfer/disclosure is restricted by U.S. law. Dissemination
- to non-U.S. persons whether in the United States or abroad requires
- an export license or other authorization.
-
- http://www.apache.org/licenses/LICENSE-2.0
- Contractor Name: Raytheon Company
- Contractor Address: 6825 Pine Street, Suite 340
- Mail Stop B8
- Omaha, NE 68106
- 402.291.0100
-
- 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.
- See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- further licensing information.
-->
<!--
- Virtual host configuration for edex
-
-
- SOFTWARE HISTORY
-
- Date Ticket# Engineer Description
- ============ ========== =========== ==========================
- Mar 18, 2013 1814 rjpeter Initial Creation
-
-->
<broker>
@ -24,12 +34,12 @@
<work>${QPID_WORK}</work>
<conf>${prefix}/etc</conf>
<plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory>
<plugin-directory>${QPID_HOME}/lib/opt</plugin-directory>
<cache-directory>${QPID_WORK}/cache</cache-directory>
<connector>
<!-- To enable SSL edit the keystorePath and keystorePassword
and set enabled to true.
and set enabled to true.
To disable Non-SSL port set sslOnly to true -->
<ssl>
<enabled>false</enabled>
@ -57,6 +67,13 @@
<keyStorePath>${conf}/qpid.keystore</keyStorePath>
<keyStorePassword>password</keyStorePassword>
</ssl>
<http>
<enabled>true</enabled>
<port>8180</port>
<basic-auth>false</basic-auth>
<sasl-auth>false</sasl-auth>
<session-timeout>600</session-timeout>
</http>
<https>
<enabled>false</enabled>
</https>
@ -102,5 +119,3 @@
<status-updates>ON</status-updates>
</broker>

View file

@ -0,0 +1,127 @@
#!/bin/bash
#
# qpidd This shell script takes care of starting and stopping
# the AWIPS qpid instance.
#
# chkconfig: - 99 10
# description: Qpid messaging broker used by the AWIPS 2 instance
# processname: qpid-server
# config: /awips2/qpid/etc/config.xml
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
RETVAL=0
prog="qpid-server"
# Who to run QPID as, usually "awips". (NOT "root")
QPIDUSER=awips
# Todays date in format of YYYYMMDD.
TODAY=`/bin/date +%Y%m%d`
QPID_HOME=/awips2/qpid
QPID_JAVA_MEM=-Xmx3072m
start() {
isRunning=`ps -ef | grep org.apache.qpid.server.Main | grep -c "PNAME=QPBRKR "`
if [ $isRunning -eq 1 ]; then
echo "WARNING: QPID already running, not starting another instance"
return 1
fi
DAEMON="${QPID_HOME}/bin/qpid-server"
QPIDSTARTLOG=${QPID_HOME}/log/start-qpid-$TODAY.log
su $QPIDUSER -c "$DAEMON" >> $QPIDSTARTLOG 2>&1 &
sleep 5
checkStatus
}
stop() {
isRunning=`ps -ef | grep org.apache.qpid.server.Main | grep -c "PNAME=QPBRKR "`
if [ $isRunning -eq 1 ]; then
pid=`ps -e -o pid,args | grep org.apache.qpid.server.Main | grep "PNAME=QPBRKR " | grep -e "^ *\([0-9]\+\)" -o`
kill $pid
CNT=0
while [[ "X$pid" != "X" ]]; do
if [ "$CNT" -ge "15" ]; then
echo "QPID did not shut down gracefully in 15 seconds, force shutting down"
kill -9 $pid
else
let CNT=${CNT}+1
fi
sleep 1
pid=`ps -e -o pid,args | grep org.apache.qpid.server.Main | grep "PNAME=QPBRKR " | grep -e "^ *\([0-9]\+\)" -o`
done
else
echo "QPID is not running"
fi
}
checkStatus() {
isRunning=`ps -ef | grep org.apache.qpid.server.Main | grep -c "PNAME=QPBRKR "`
if [ $isRunning -eq 1 ]; then
pid=`ps -e -o pid,args | grep org.apache.qpid.server.Main | grep "PNAME=QPBRKR " | grep -e "^ *\([0-9]\+\)" -o`
echo "QPID is running (PID $pid)"
else
echo "QPID is not running"
fi
}
# Verify root user
checkUser() {
REQUIREDUSER="root"
CURUSER=`whoami`
if [ "$CURUSER" != "$REQUIREDUSER" ]; then
echo "Insufficient privileges: must run script as $REQUIREDUSER"
exit 1
fi
}
# See how we were called.
case $1 in
start)
checkUser
echo "Starting QPID"
start
RETVAL=$?
;;
stop)
checkUser
echo "Stopping QPID"
stop
RETVAL=$?
;;
restart)
checkUser
echo "Stopping QPID"
stop
echo "Starting QPID"
start
RETVAL=$?
;;
status)
checkStatus
RETVAL=$?
;;
*)
# Print help
echo "Usage: $0 {start|stop|restart|reload|status}" 1>&2
exit 1
;;
esac
exit $RETVAL

View file

@ -1,22 +1,32 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
- This software was developed and / or modified by Raytheon Company,
- pursuant to Contract DG133W-05-CQ-1067 with the US Government.
-
- 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
- U.S. EXPORT CONTROLLED TECHNICAL DATA
- This software product contains export-restricted data whose
- export/transfer/disclosure is restricted by U.S. law. Dissemination
- to non-U.S. persons whether in the United States or abroad requires
- an export license or other authorization.
-
- http://www.apache.org/licenses/LICENSE-2.0
- Contractor Name: Raytheon Company
- Contractor Address: 6825 Pine Street, Suite 340
- Mail Stop B8
- Omaha, NE 68106
- 402.291.0100
-
- 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.
- See the AWIPS II Master Rights File ("Master Rights File.pdf") for
- further licensing information.
-->
<!--
- Virtual host configuration for edex
-
-
- SOFTWARE HISTORY
-
- Date Ticket# Engineer Description
- ============ ========== =========== ==========================
- Mar 18, 2013 1814 rjpeter Initial Creation
-
-->
<virtualhosts>
@ -29,6 +39,63 @@
<class>org.apache.qpid.server.store.derby.DerbyMessageStore</class>
<environment-path>${QPID_WORK}/messageStore</environment-path>
</store>
<slow-consumer-detection>
<!-- Only check every 5 minutes -->
<delay>5</delay>
<timeunit>minutes</timeunit>
</slow-consumer-detection>
<queues>
<!-- Define default exchange -->
<exchange>amq.direct</exchange>
<!-- Set threshold values for queue monitor alerting to log -->
<!-- If a queue has more than this in memory print an error message -->
<maximumQueueDepth>5294080</maximumQueueDepth> <!-- 5Mb (QPID appears to use X * 1024^2 + X * 10 * 1024) -->
<!-- Logs if any message is this large -->
<maximumMessageSize>2117632</maximumMessageSize> <!-- 2Mb -->
<!-- Logs a message if any message is on queue for more than 5 minutes -->
<maximumMessageAge>300000</maximumMessageAge> <!-- 5 min -->
<!-- Logs a message if there are more that 15k messages on queue -->
<maximumMessageCount>15000</maximumMessageCount>
<durable>true</durable>
<!-- Configure queues
<queue>
<name>external.dropbox</name>
<external..dropbox>
<durable>true</durable>
</external..dropbox>
</queue>
-->
</queues>
<topics>
<slow-consumer-detection>
<!-- The maximum depth in bytes before -->
<!-- the policy will be applied-->
<!--depth>4235264</depth-->
<!-- The maximum message age in milliseconds -->
<!-- before the policy will be applied -->
<messageAge>600000</messageAge>
<!-- The maximum number of message before -->
<!-- which the policy will be applied-->
<messageCount>5000</messageCount>
<!-- Policy Selection -->
<policy>
<name>topicDelete</name>
<topicDelete>
<!-- Uncomment to enable deletion of durable subscriptions that fall behind -->
<!--delete-persistent/-->
</topicDelete>
</policy>
</slow-consumer-detection>
<!-- Slow Consumer disconnect could be configured per topic. Use global configuration for now -->
</topics>
</edex>
</virtualhost>
</virtualhosts>