diff options
author | Alan Conway <aconway@apache.org> | 2007-12-14 17:21:53 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-12-14 17:21:53 +0000 |
commit | f0f3517c9e422ac251eb9bbce028b4e43d103797 (patch) | |
tree | bad85fbf51d9b0b1bda53ed25f2e33bae04b4462 /qpid/cpp | |
parent | 49c8b9c165b986d7baf17fab9e264c7525ab41c8 (diff) | |
download | qpid-python-f0f3517c9e422ac251eb9bbce028b4e43d103797.tar.gz |
From: Jonathan Robie <jrobie@redhat.com>
- Updated examples and verify script.
From me: Integration of verify in make check.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@604235 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r-- | qpid/cpp/examples/Makefile.am | 17 | ||||
-rw-r--r-- | qpid/cpp/examples/examples/direct/Makefile | 2 | ||||
-rw-r--r-- | qpid/cpp/examples/examples/direct/declare_queues.cpp | 84 | ||||
-rw-r--r-- | qpid/cpp/examples/examples/direct/direct_producer.cpp | 104 | ||||
-rw-r--r-- | qpid/cpp/examples/examples/direct/listener.cpp | 14 | ||||
-rw-r--r-- | qpid/cpp/examples/examples/direct/verify.in | 23 | ||||
-rw-r--r-- | qpid/cpp/examples/examples/fanout/Makefile | 2 | ||||
-rw-r--r-- | qpid/cpp/examples/examples/fanout/declare_queues.cpp | 85 | ||||
-rw-r--r-- | qpid/cpp/examples/examples/fanout/fanout_producer.cpp | 102 | ||||
-rw-r--r-- | qpid/cpp/examples/examples/fanout/listener.cpp | 2 | ||||
-rw-r--r-- | qpid/cpp/examples/examples/fanout/verify.in | 4 | ||||
-rw-r--r-- | qpid/cpp/examples/examples/request-response/client.cpp | 13 | ||||
-rw-r--r-- | qpid/cpp/examples/examples/request-response/server.cpp | 20 | ||||
-rw-r--r-- | qpid/cpp/examples/examples/request-response/verify.in | 10 | ||||
-rwxr-xr-x | qpid/cpp/examples/verify | 28 |
15 files changed, 448 insertions, 62 deletions
diff --git a/qpid/cpp/examples/Makefile.am b/qpid/cpp/examples/Makefile.am index 1e0693ef6e..02d5961fad 100644 --- a/qpid/cpp/examples/Makefile.am +++ b/qpid/cpp/examples/Makefile.am @@ -24,15 +24,26 @@ EXTRA_DIST=$(nobase_pkgdata_DATA) # Note: we don't use normal automake SUBDIRS because the example # makefiles don't understand all the recursive automake targets. -clean: +clean-local: cd examples; $(MAKE) clean + rm -f examples/*/*.out examples/*/*.wait abs_srcdir=@abs_srcdir@ +abs_top_builddir=@abs_top_builddir@ -# Build the installed examples, then clean up to avoid rpmbuild warnings. +# Build the examples in the source tree. +all-local: + cd examples && $(MAKE) CXX="$(CXX)" CXXFLAGS="-I../../$(top_srcdir)/src -I../../$(top_srcdir)/src/gen -I../../$(top_builddir)/src/gen -L../../$(top_builddir)/src/.libs -Wl,-rpath,$(abs_top_builddir)/src/.libs" all + +# Verify the examples in the source tree. +check-local: + cd examples && QPIDD=$(abs_top_builddir)/src/qpidd ../verify + +# Build and verify the installed examples, then clean up to avoid rpmbuild warnings. EXAMPLE_FLAGS=-I$(DESTDIR)$(includedir) -L$(DESTDIR)$(libdir) -Wl,-rpath,$(DESTDIR)$(libdir) EXAMPLE_DIR=$(DESTDIR)$(pkgdatadir)/examples installcheck-local: cd $(EXAMPLE_DIR) && $(MAKE) CXX="$(CXX)" CXXFLAGS="$(EXAMPLE_FLAGS)" all - cd $(EXAMPLE_DIR) && $(abs_srcdir)/verify + cd $(EXAMPLE_DIR) && QPIDD=$(top_builddir)/src/qpidd $(abs_srcdir)/verify cd $(EXAMPLE_DIR) && $(MAKE) clean + diff --git a/qpid/cpp/examples/examples/direct/Makefile b/qpid/cpp/examples/examples/direct/Makefile index e7ed5beb58..380b5cfcb4 100644 --- a/qpid/cpp/examples/examples/direct/Makefile +++ b/qpid/cpp/examples/examples/direct/Makefile @@ -2,7 +2,7 @@ CXX=g++ CXXFLAGS= LDFLAGS=-lqpidclient -PROGRAMS=direct_config_queues direct_persistent_config_queues direct_persistent_publisher direct_publisher listener +PROGRAMS=declare_queues direct_producer listener all: $(PROGRAMS) diff --git a/qpid/cpp/examples/examples/direct/declare_queues.cpp b/qpid/cpp/examples/examples/direct/declare_queues.cpp new file mode 100644 index 0000000000..861a4329c5 --- /dev/null +++ b/qpid/cpp/examples/examples/direct/declare_queues.cpp @@ -0,0 +1,84 @@ +/* + * + * 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. + * + */ + +/** + * declare_queues.cpp + * + * This program is one of three programs designed to be used + * together. These programs use the "amq.direct" exchange. + * + * direct_config_queues.cpp (this program): + * + * Creates a queue on a broker, binding a routing key to route + * messages to that queue. + * + * direct_producer.cpp: + * + * Publishes to a broker, specifying a routing key. + * + * listener.cpp + * + * Reads from a queue on the broker using a message listener. + * + */ + +#include <qpid/client/Connection.h> +#include <qpid/client/Session.h> + +#include <unistd.h> +#include <cstdlib> +#include <iostream> + +using namespace qpid::client; +using namespace qpid::framing; + +using std::string; + + +int main() { + Connection connection; + Message msg; + try { + connection.open("127.0.0.1", 5672); + Session session = connection.newSession(); + + + //--------- Main body of program -------------------------------------------- + + // Create a queue named "message_queue", and route all messages whose + // routing key is "routing_key to this newly created queue. + + session.queueDeclare(arg::queue="message_queue"); + session.queueBind(arg::exchange="amq.direct", arg::queue="message_queue", arg::routingKey="routing_key"); + + //----------------------------------------------------------------------------- + + connection.close(); + return 0; + } catch(const std::exception& error) { + std::cout << error.what() << std::endl; + } + return 1; + +} + + + diff --git a/qpid/cpp/examples/examples/direct/direct_producer.cpp b/qpid/cpp/examples/examples/direct/direct_producer.cpp new file mode 100644 index 0000000000..1500b77399 --- /dev/null +++ b/qpid/cpp/examples/examples/direct/direct_producer.cpp @@ -0,0 +1,104 @@ +/* + * + * 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. + * + */ + + +/** + * direct_producer.cpp: + * + * This program is one of three programs designed to be used + * together. These programs do not specify the exchange type - the + * default exchange type is the direct exchange. + * + * create_queues.cpp: + * + * Creates a queue on a broker, binding a routing key to route + * messages to that queue. + * + * direct_producer.cpp (this program): + * + * Publishes to a broker, specifying a routing key. + * + * listener.cpp + * + * Reads from a queue on the broker using a message listener. + * + */ + + +#include <qpid/client/Connection.h> +#include <qpid/client/Session.h> +#include <qpid/client/Message.h> + + +#include <unistd.h> +#include <cstdlib> +#include <iostream> + +#include <sstream> + +using namespace qpid::client; +using namespace qpid::framing; + +using std::stringstream; +using std::string; + +int main() { + Connection connection; + Message message; + try { + connection.open("127.0.0.1", 5672 ); + Session session = connection.newSession(); + + //--------- Main body of program -------------------------------------------- + + // The routing key is a message property. We will use the same + // routing key for each message, so we'll set this property + // just once. (In most simple cases, there is no need to set + // other message properties.) + + message.getDeliveryProperties().setRoutingKey("routing_key"); + + // Now send some messages ... + + for (int i=0; i<10; i++) { + stringstream message_data; + message_data << "Message " << i; + + message.setData(message_data.str()); + session.messageTransfer(arg::content=message, arg::destination="amq.direct"); + } + + // And send a final message to indicate termination. + + message.setData("That's all, folks!"); + session.messageTransfer(arg::content=message, arg::destination="amq.direct"); + + //----------------------------------------------------------------------------- + + connection.close(); + return 0; + } catch(const std::exception& error) { + std::cout << error.what() << std::endl; + } + return 1; +} + + diff --git a/qpid/cpp/examples/examples/direct/listener.cpp b/qpid/cpp/examples/examples/direct/listener.cpp index 52840efa03..a2486dd309 100644 --- a/qpid/cpp/examples/examples/direct/listener.cpp +++ b/qpid/cpp/examples/examples/direct/listener.cpp @@ -20,22 +20,22 @@ */ /** - * direct_listener.cpp: + * listener.cpp: * * This program is one of three programs designed to be used * together. These programs do not specify the exchange type - the * default exchange type is the direct exchange. * - * direct_config_queues.cpp: + * declare_queues.cpp: * * Creates a queue on a broker, binding a routing key to route * messages to that queue. * - * direct_publisher.cpp: + * direct_producer.cpp: * * Publishes to a broker, specifying a routing key. * - * direct_listener.cpp (this program): + * listener.cpp (this program): * * Reads from a queue on the broker using a message listener. * @@ -75,8 +75,7 @@ void Listener::listen() { std::cout << "Activating listener for: " <<destination_name << std::endl; dispatcher.listen(destination_name, this); - // ### The following line gives up control - it should be possible - // ### to listen without giving up control! + // The following line gives up control dispatcher.run(); } @@ -110,8 +109,7 @@ int main() { session.messageSubscribe(arg::queue="message_queue", arg::destination="listener_destination"); - // Allocate some credit ### This really should not be needed for simple examples ! #### - + //############## session.messageFlow(arg::destination="listener_destination", arg::unit=0, arg::value=1);//messages ### Define a constant? session.messageFlow(arg::destination="listener_destination", arg::unit=1, arg::value=0xFFFFFFFF);//bytes ###### Define a constant? diff --git a/qpid/cpp/examples/examples/direct/verify.in b/qpid/cpp/examples/examples/direct/verify.in index 3d344071f2..558062cee2 100644 --- a/qpid/cpp/examples/examples/direct/verify.in +++ b/qpid/cpp/examples/examples/direct/verify.in @@ -1,25 +1,6 @@ -==== ./direct_config_queues +==== ./declare_queues ==== -==== ./direct_publisher -==== -==== ./listener -Activating listener for: listener_destination -Message: Message 0 -Message: Message 1 -Message: Message 2 -Message: Message 3 -Message: Message 4 -Message: Message 5 -Message: Message 6 -Message: Message 7 -Message: Message 8 -Message: Message 9 -Message: That's all, folks! -Shutting down listener for listener_destination -==== -==== ./direct_persistent_config_queues -==== -==== ./direct_persistent_publisher +==== ./direct_producer ==== ==== ./listener Activating listener for: listener_destination diff --git a/qpid/cpp/examples/examples/fanout/Makefile b/qpid/cpp/examples/examples/fanout/Makefile index d8fa9d7bb3..b58026f337 100644 --- a/qpid/cpp/examples/examples/fanout/Makefile +++ b/qpid/cpp/examples/examples/fanout/Makefile @@ -2,7 +2,7 @@ CXX=g++ CXXFLAGS= LDFLAGS=-lqpidclient -PROGRAMS=fanout_config_queues fanout_publisher listener +PROGRAMS=declare_queues fanout_producer listener all: $(PROGRAMS) diff --git a/qpid/cpp/examples/examples/fanout/declare_queues.cpp b/qpid/cpp/examples/examples/fanout/declare_queues.cpp new file mode 100644 index 0000000000..f4f74ba1e9 --- /dev/null +++ b/qpid/cpp/examples/examples/fanout/declare_queues.cpp @@ -0,0 +1,85 @@ +/* + * + * 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. + * + */ + +/** + * direct_config_queues.cpp + * + * This program is one of three programs designed to be used + * together. These programs use the "amq.direct" exchange. + * + * direct_config_queues.cpp (this program): + * + * Creates a queue on a broker, binding a routing key to route + * messages to that queue. + * + * direct_publisher.cpp: + * + * Publishes to a broker, specifying a routing key. + * + * direct_listener.cpp + * + * Reads from a queue on the broker using a message listener. + * + */ + +#include <qpid/client/Connection.h> +#include <qpid/client/Session.h> + +#include <unistd.h> +#include <cstdlib> +#include <iostream> + +using namespace qpid::client; +using namespace qpid::framing; + +using std::string; + + +int main() { + Connection connection; + Message msg; + try { + connection.open("127.0.0.1", 5672); + Session session = connection.newSession(); + + + //--------- Main body of program -------------------------------------------- + + // Create a queue named "message_queue", and route all messages whose + // routing key is "routing_key to this newly created queue. + + session.queueDeclare(arg::queue="message_queue"); + session.queueBind(arg::queue="message_queue", arg::exchange="amq.fanout"); + + + //----------------------------------------------------------------------------- + + connection.close(); + return 0; + } catch(const std::exception& error) { + std::cout << error.what() << std::endl; + } + return 1; + +} + + + diff --git a/qpid/cpp/examples/examples/fanout/fanout_producer.cpp b/qpid/cpp/examples/examples/fanout/fanout_producer.cpp new file mode 100644 index 0000000000..976c53aae4 --- /dev/null +++ b/qpid/cpp/examples/examples/fanout/fanout_producer.cpp @@ -0,0 +1,102 @@ +/* + * + * 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. + * + */ + + +/** + * direct_publisher.cpp: + * + * This program is one of three programs designed to be used + * together. These programs do not specify the exchange type - the + * default exchange type is the direct exchange. + * + * direct_config_queues.cpp: + * + * Creates a queue on a broker, binding a routing key to route + * messages to that queue. + * + * direct_publisher.cpp (this program): + * + * Publishes to a broker, specifying a routing key. + * + * direct_listener.cpp + * + * Reads from a queue on the broker using a message listener. + * + */ + + +#include <qpid/client/Connection.h> +#include <qpid/client/Session.h> +#include <qpid/client/Message.h> + + +#include <unistd.h> +#include <cstdlib> +#include <iostream> + +#include <sstream> + +using namespace qpid::client; +using namespace qpid::framing; + +using std::stringstream; +using std::string; + +int main() { + Connection connection; + Message message; + try { + connection.open("127.0.0.1", 5672 ); + Session session = connection.newSession(); + + //--------- Main body of program -------------------------------------------- + + // Unlike topic exchanges and direct exchanges, a fanout + // exchange need not set a routing key. + + Message message; + + // Now send some messages ... + + for (int i=0; i<10; i++) { + stringstream message_data; + message_data << "Message " << i; + + message.setData(message_data.str()); + session.messageTransfer(arg::content=message, arg::destination="amq.fanout"); + } + + // And send a final message to indicate termination. + + message.setData("That's all, folks!"); + session.messageTransfer(arg::content=message, arg::destination="amq.fanout"); + + //----------------------------------------------------------------------------- + + connection.close(); + return 0; + } catch(const std::exception& error) { + std::cout << error.what() << std::endl; + } + return 1; +} + + diff --git a/qpid/cpp/examples/examples/fanout/listener.cpp b/qpid/cpp/examples/examples/fanout/listener.cpp index 52840efa03..9cf2bf0e4b 100644 --- a/qpid/cpp/examples/examples/fanout/listener.cpp +++ b/qpid/cpp/examples/examples/fanout/listener.cpp @@ -110,8 +110,6 @@ int main() { session.messageSubscribe(arg::queue="message_queue", arg::destination="listener_destination"); - // Allocate some credit ### This really should not be needed for simple examples ! #### - session.messageFlow(arg::destination="listener_destination", arg::unit=0, arg::value=1);//messages ### Define a constant? session.messageFlow(arg::destination="listener_destination", arg::unit=1, arg::value=0xFFFFFFFF);//bytes ###### Define a constant? diff --git a/qpid/cpp/examples/examples/fanout/verify.in b/qpid/cpp/examples/examples/fanout/verify.in index ca3ae7c3b6..44154d2b52 100644 --- a/qpid/cpp/examples/examples/fanout/verify.in +++ b/qpid/cpp/examples/examples/fanout/verify.in @@ -1,6 +1,6 @@ -==== ./fanout_config_queues +==== ./declare_queues ==== -==== ./fanout_publisher +==== ./fanout_producer ==== ==== ./listener Activating listener for: listener_destination diff --git a/qpid/cpp/examples/examples/request-response/client.cpp b/qpid/cpp/examples/examples/request-response/client.cpp index 59024a1cb6..68a991bc1c 100644 --- a/qpid/cpp/examples/examples/request-response/client.cpp +++ b/qpid/cpp/examples/examples/request-response/client.cpp @@ -79,7 +79,6 @@ void Listener::listen() { session.messageSubscribe(arg::queue=destination_name, arg::destination=destination_name); - // Allocate credit. Sigh. This really should not be required ##### session.messageFlow(arg::destination=destination_name, arg::unit=0, arg::value=1);//messages ### Define a constant? session.messageFlow(arg::destination=destination_name, arg::unit=1, arg::value=0xFFFFFFFF);//bytes ###### Define a constant? @@ -126,8 +125,8 @@ int main() { // Use the name of the response queue as the routing key - session.queueDeclare(arg::queue=response_queue.str()); // ### Nice if I could just use strstream for this - session.queueBind(arg::queue=response_queue.str(), arg::routingKey=response_queue.str()); + session.queueDeclare(arg::queue=response_queue.str()); + session.queueBind(arg::exchange="amq.direct", arg::queue=response_queue.str(), arg::routingKey=response_queue.str()); // Create a listener for the response queue and start listening. @@ -136,13 +135,13 @@ int main() { // The routing key for the request queue is simply - // "request_queue", and all clients use the same routing key. + // "request", and all clients use the same routing key. // // Each client sends the name of their own response queue so // the service knows where to route messages. - request.getDeliveryProperties().setRoutingKey("request_queue"); - request.getHeaders().setString("reply-to", response_queue.str()); + request.getDeliveryProperties().setRoutingKey("request"); + request.getMessageProperties().setReplyTo(ReplyTo("", response_queue.str())); // Now send some requests ... @@ -156,7 +155,7 @@ int main() { for (int i=0; i<4; i++) { request.setData(s[i]); - session.messageTransfer(arg::content=request); + session.messageTransfer(arg::content=request, arg::destination="amq.direct"); std::cout << "Request: " << s[i] << std::endl; } diff --git a/qpid/cpp/examples/examples/request-response/server.cpp b/qpid/cpp/examples/examples/request-response/server.cpp index 6c82090794..1aae49829f 100644 --- a/qpid/cpp/examples/examples/request-response/server.cpp +++ b/qpid/cpp/examples/examples/request-response/server.cpp @@ -99,9 +99,19 @@ void Listener::wait() { void Listener::received(Message& request) { Message response; - string routingKey = request.getHeaders().getString("reply-to"); - std::cout << "Request:: " << request.getData() << " (" <<routingKey << ")" << std::endl; + // Get routing key for response from the request's replyTo property + + string routingKey; + + if (request.getMessageProperties().hasReplyTo()) { + routingKey = request.getMessageProperties().getReplyTo().getRoutingKey(); + } else { + std::cout << "Error: " << "No routing key for request (" << request.getData() << ")" << std::endl; + return; + } + + std::cout << "Request: " << request.getData() << " (" <<routingKey << ")" << std::endl; // Transform message content to upper case std::string s = request.getData(); @@ -110,7 +120,7 @@ void Listener::received(Message& request) { // Send it back to the user response.getDeliveryProperties().setRoutingKey(routingKey); - session.messageTransfer(arg::content=response); + session.messageTransfer(arg::content=response, arg::destination="amq.direct"); } @@ -126,12 +136,12 @@ int main() { // Create a request queue for clients to use when making // requests. - string request_queue = "request_queue"; + string request_queue = "request"; // Use the name of the request queue as the routing key session.queueDeclare(arg::queue=request_queue); - session.queueBind(arg::queue=request_queue, arg::routingKey=request_queue); + session.queueBind(arg::exchange="amq.direct", arg::queue=request_queue, arg::routingKey=request_queue); // Create a listener for the request queue and start listening. diff --git a/qpid/cpp/examples/examples/request-response/verify.in b/qpid/cpp/examples/examples/request-response/verify.in index 52034bdfd0..81777fd049 100644 --- a/qpid/cpp/examples/examples/request-response/verify.in +++ b/qpid/cpp/examples/examples/request-response/verify.in @@ -12,10 +12,10 @@ Response: AND THE MOME RATHS OUTGRABE. Shutting down listener for client ==== ==== remove_uuid server.out -Activating request queue listener for: request_queue +Activating request queue listener for: request Waiting for requests -Request:: Twas brillig, and the slithy toves (client ) -Request:: Did gire and gymble in the wabe. (client ) -Request:: All mimsy were the borogroves, (client ) -Request:: And the mome raths outgrabe. (client ) +Request: Twas brillig, and the slithy toves (client ) +Request: Did gire and gymble in the wabe. (client ) +Request: All mimsy were the borogroves, (client ) +Request: And the mome raths outgrabe. (client ) ==== diff --git a/qpid/cpp/examples/verify b/qpid/cpp/examples/verify index 78b622e400..695a1ee3e7 100755 --- a/qpid/cpp/examples/verify +++ b/qpid/cpp/examples/verify @@ -5,6 +5,14 @@ DIR=$PWD SRC=`dirname $0 | sed 's|^\([^/].*\)|'$PWD'/\1|'`/examples +# Start private broker if QPIDD is set. + +if [ -n "$QPIDD" ] ; then + QPID_PORT=`$QPIDD -dp0` || { echo "Cannot start $QPIDD" ; exit 1; } + export QPID_PORT + trap "$QPIDD -q" EXIT +fi + # Utility functions run() { @@ -28,17 +36,20 @@ remove_uuid() { # Scripts for each example direct() { - run ./direct_config_queues > verify.out - run ./direct_publisher >> verify.out + run ./declare_queues > verify.out + run ./direct_producer >> verify.out run ./listener >> verify.out - run ./direct_persistent_config_queues >> verify.out - run ./direct_persistent_publisher >> verify.out +} + +persistent() { + run ./declare_queues >> verify.out + run ./direct_persistent_producer >> verify.out run ./listener >> verify.out } fanout() { - run ./fanout_config_queues > verify.out - run ./fanout_publisher >>verify.out + run ./declare_queues > verify.out + run ./fanout_producer >>verify.out run ./listener >>verify.out } @@ -59,11 +70,14 @@ request_response() { run remove_uuid server.out >> verify.out } +# FIXME aconway 2007-12-14: put back pub-sub and persistence when fixed. + # Main -for ex in direct fanout pub-sub request-response; do +for ex in direct fanout request-response ; do func=`echo $ex | tr - _` echo "Verifing $ex" ( cd $ex && $func && verify && rm -f *.out *.wait) done exit $RET + |