diff options
Diffstat (limited to 'RC9/qpid/dotnet/client-010/examples/fanout')
22 files changed, 757 insertions, 0 deletions
diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Listener.cs b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Listener.cs new file mode 100644 index 0000000000..4d3da690a9 --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Listener.cs @@ -0,0 +1,121 @@ +/*
+* 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.
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Threading;
+using org.apache.qpid.client;
+using org.apache.qpid.transport;
+
+namespace org.apache.qpid.example.fanout
+{
+ /// <summary>
+ /// This program is one of two programs designed to be used
+ /// together.
+ ///
+ /// Producer (this program):
+ ///
+ /// Publishes to a broker, specifying a routing key.
+ ///
+ /// Listener:
+ ///
+ /// Reads from a queue on the broker using a message listener.
+ ///
+ /// </summary>
+ public class Listener
+ {
+ private static void Main(string[] args)
+ {
+ string host = args.Length > 0 ? args[0] : "localhost";
+ int port = args.Length > 1 ? Convert.ToInt32(args[1]) : 5672;
+ Client connection = new Client();
+ try
+ {
+ connection.connect(host, port, "test", "guest", "guest");
+ ClientSession session = connection.createSession(50000);
+
+ //--------- Main body of program --------------------------------------------
+ // Each client creates its own private queue, using the
+ // session id to guarantee a unique name. It then routes
+ // all messages from the fanout exchange to its own queue
+ // by binding to the queue.
+ //
+ // The binding specifies a binding key, but for a fanout
+ // exchange, the binding key is optional and is not used
+ // for routing decisions. It can be useful for tracking
+ // messages and routing in logs.
+
+ string myQueue = session.Name;
+ session.queueDeclare(myQueue, Option.EXCLUSIVE, Option.AUTO_DELETE);
+ session.exchangeBind(myQueue, "amq.fanout", "my-key");
+
+ lock (session)
+ {
+ Console.WriteLine("Listening");
+ // Create a listener and subscribe it to my queue.
+ IMessageListener listener = new MessageListener(session);
+ session.attachMessageListener(listener, myQueue);
+ session.messageSubscribe(myQueue);
+ // Receive messages until all messages are received
+ Monitor.Wait(session);
+ }
+
+ //---------------------------------------------------------------------------
+
+ connection.close();
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine("Error: \n" + e.StackTrace);
+ }
+ }
+ }
+
+ public class MessageListener : IMessageListener
+ {
+ private readonly ClientSession _session;
+ private readonly RangeSet _range = new RangeSet();
+ public MessageListener(ClientSession session)
+ {
+ _session = session;
+ }
+
+ public void messageTransfer(IMessage m)
+ {
+ BinaryReader reader = new BinaryReader(m.Body, Encoding.UTF8);
+ byte[] body = new byte[m.Body.Length - m.Body.Position];
+ reader.Read(body, 0, body.Length);
+ ASCIIEncoding enc = new ASCIIEncoding();
+ string message = enc.GetString(body);
+ Console.WriteLine("Message: " + message);
+ // Add this message to the list of message to be acknowledged
+ _range.add(m.Id);
+ if (message.Equals("That's all, folks!"))
+ {
+ // Acknowledge all the received messages
+ _session.messageAccept(_range);
+ lock (_session)
+ {
+ Monitor.Pulse(_session);
+ }
+ }
+ }
+ }
+}
diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Properties/AssemblyInfo.cs b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..6454ae44db --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Properties/AssemblyInfo.cs @@ -0,0 +1,54 @@ +/* + * + * 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. + * + */ + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("example-fanout-Listener")] +[assembly: AssemblyDescription("Built from svn revision number: ")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Apache Software Foundation")] +[assembly: AssemblyProduct("example-fanout-Listener")] +[assembly: AssemblyCopyright("Apache Software Foundation")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("68686ef9-aa0a-4334-9c52-d7e6fc507bec")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("0.10.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/default.build b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/default.build new file mode 100644 index 0000000000..bdf5cc80c5 --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/default.build @@ -0,0 +1,47 @@ +<?xml version="1.0"?> +<!-- + + 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. + +--> + +<project name="example-fanout-Listener" default="build"> + <!-- + Properties that come from master build file + - build.dir: root directory for build + - build.debug: true if building debug release + - build.defines: variables to define during build + --> + + <target name="build"> + <csc target="exe" + define="${build.defines}" + debug="${build.debug}" + output="${build.dir}/${project::get-name()}.exe"> + + <sources> + <include name="**/*.cs" /> + </sources> + <references> + <include name="${build.dir}/log4net.dll" /> + <include name="${build.dir}/qpid.client.dll" /> + </references> + </csc> + </target> +</project> + diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/example-fanout-Listener.csproj b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/example-fanout-Listener.csproj new file mode 100644 index 0000000000..c2c8833e34 --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/example-fanout-Listener.csproj @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{18A0792B-DC3A-4EC5-93D6-DB8A111D8F15}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>example_fanout_Listener</RootNamespace>
+ <AssemblyName>example-fanout-Listener</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>2.0</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Listener.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\client\Client.csproj">
+ <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
+ <Name>Client</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + -->
+</Project>
\ No newline at end of file diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Producer.cs b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Producer.cs new file mode 100644 index 0000000000..f2818a4099 --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Producer.cs @@ -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.
+*/
+
+using System;
+using System.Text;
+using org.apache.qpid.client;
+
+namespace org.apache.qpid.example.fanout
+{
+ /// <summary>
+ /// This program is one of two programs designed to be used
+ /// together. These programs do not specify the exchange type - the
+ /// default exchange type is the direct exchange.
+ ///
+ ///
+ /// Producer (this program):
+ ///
+ /// Publishes to a broker, specifying a routing key.
+ ///
+ /// Listener:
+ ///
+ /// Reads from a queue on the broker using a message listener.
+ ///
+ /// </summary>
+ class Producer
+ {
+ static void Main(string[] args)
+ {
+ string host = args.Length > 0 ? args[0] : "localhost";
+ int port = args.Length > 1 ? Convert.ToInt32(args[1]) : 5672;
+ Client connection = new Client();
+ try
+ {
+ connection.connect(host, port, "test", "guest", "guest");
+ ClientSession session = connection.createSession(50000);
+
+ //--------- Main body of program --------------------------------------------
+
+ // Unlike topic exchanges and direct exchanges, a fanout
+ // exchange need not set a routing key.
+ IMessage message = new Message();
+
+ // Asynchronous transfer sends messages as quickly as
+ // possible without waiting for confirmation.
+ for (int i = 0; i < 10; i++)
+ {
+ message.clearData();
+ message.appendData(Encoding.UTF8.GetBytes("Message " + i));
+ session.messageTransfer("amq.fanout", message);
+ }
+
+ // And send a syncrhonous final message to indicate termination.
+ message.clearData();
+ message.appendData(Encoding.UTF8.GetBytes("That's all, folks!"));
+ session.messageTransfer("amq.fanout", message);
+ session.sync();
+
+ //-----------------------------------------------------------------------------
+
+ connection.close();
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine("Error: \n" + e.StackTrace);
+ }
+ }
+ }
+}
diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Properties/AssemblyInfo.cs b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..3054ba09db --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Properties/AssemblyInfo.cs @@ -0,0 +1,54 @@ +/* + * + * 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. + * + */ + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("example-fanout-Producer")] +[assembly: AssemblyDescription("Built from svn revision number: ")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Apache Software Foundation")] +[assembly: AssemblyProduct("example-fanout-Producer")] +[assembly: AssemblyCopyright("Apache Software Foundation")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("01c0ba10-2f23-409b-9adc-bc514a13131a")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("0.10.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/default.build b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/default.build new file mode 100644 index 0000000000..874854a51b --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/default.build @@ -0,0 +1,47 @@ +<?xml version="1.0"?> +<!-- + + 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. + +--> + +<project name="example-fanout-Producer" default="build"> + <!-- + Properties that come from master build file + - build.dir: root directory for build + - build.debug: true if building debug release + - build.defines: variables to define during build + --> + + <target name="build"> + <csc target="exe" + define="${build.defines}" + debug="${build.debug}" + output="${build.dir}/${project::get-name()}.exe"> + + <sources> + <include name="**/*.cs" /> + </sources> + <references> + <include name="${build.dir}/log4net.dll" /> + <include name="${build.dir}/qpid.client.dll" /> + </references> + </csc> + </target> +</project> + diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/example-fanout-Producer.csproj b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/example-fanout-Producer.csproj new file mode 100644 index 0000000000..83959fe3af --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/example-fanout-Producer.csproj @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{4513BF94-D54A-42FE-8506-FE2CD57B2C51}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>example_fanout_Producer</RootNamespace>
+ <AssemblyName>example-fanout-Producer</AssemblyName>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>2.0</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Producer.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\client\Client.csproj">
+ <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
+ <Name>Client</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + -->
+</Project>
\ No newline at end of file diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/verify b/RC9/qpid/dotnet/client-010/examples/fanout/verify new file mode 100644 index 0000000000..51b7327243 --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/verify @@ -0,0 +1,36 @@ +# +# +# 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. +# +# + +# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify + +fanout_listener_dotnet() +{ +mono $DOTNET_EXAMPLES/example-fanout-Listener.exe localhost 5672 +} + +fanout_producer_dotnet() +{ +mono $DOTNET_EXAMPLES/example-fanout-Producer.exe localhost 5672 +} + +background "Listening" fanout_listener_dotnet +clients fanout_producer_dotnet +outputs ./fanout_listener_dotnet.out ./fanout_producer_dotnet.out diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/verify.in b/RC9/qpid/dotnet/client-010/examples/fanout/verify.in new file mode 100644 index 0000000000..37a4a4aaa8 --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/verify.in @@ -0,0 +1,14 @@ +==== fanout_listener_dotnet.out +Listening +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! +==== fanout_producer_dotnet.out diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/verify_cpp_dotnet b/RC9/qpid/dotnet/client-010/examples/fanout/verify_cpp_dotnet new file mode 100644 index 0000000000..b9b0d94857 --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/verify_cpp_dotnet @@ -0,0 +1,11 @@ +# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify +cpp=$CPP/fanout + +fanout_listener_dotnet() +{ +mono $DOTNET_EXAMPLES/example-fanout-Listener.exe localhost 5672 +} + +background "Listening" fanout_listener_dotnet +clients $cpp/fanout_producer +outputs $cpp/fanout_producer.out "./fanout_listener_dotnet.out | remove_uuid" diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/verify_cpp_dotnet.in b/RC9/qpid/dotnet/client-010/examples/fanout/verify_cpp_dotnet.in new file mode 100644 index 0000000000..0a72d8fd3c --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/verify_cpp_dotnet.in @@ -0,0 +1,14 @@ +==== fanout_producer.out +==== fanout_listener_dotnet.out | remove_uuid +Listening +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! diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_cpp b/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_cpp new file mode 100644 index 0000000000..1b27ea8653 --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_cpp @@ -0,0 +1,12 @@ +# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify +cpp=$CPP/fanout + +fanout_producer_dotnet() +{ +mono $DOTNET_EXAMPLES/example-fanout-Producer.exe localhost 5672 +} + + +background "Listening" $cpp/listener +clients fanout_producer_dotnet +outputs ./fanout_producer_dotnet.out "$cpp/listener.out | remove_uuid" diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_cpp.in b/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_cpp.in new file mode 100644 index 0000000000..588559938f --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_cpp.in @@ -0,0 +1,15 @@ +==== fanout_producer_dotnet.out +==== listener.out | remove_uuid +Listening +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 diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_java b/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_java new file mode 100644 index 0000000000..88576814d7 --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_java @@ -0,0 +1,16 @@ +# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify + +fanout_producer_dotnet() +{ +mono $DOTNET_EXAMPLES/example-fanout-Producer.exe localhost 5672 +} + + +fanout_listener_java() +{ +java -Dlog4j.configuration=file://"$JAVA"/log4j.xml -cp "$CLASSPATH" org.apache.qpid.example.jmsexample.fanout.Listener $1 +} + +background "can receive messages" fanout_listener_java fanoutQueue1 +clients fanout_producer_dotnet +outputs ./fanout_producer_dotnet.out "./fanout_listener_java.out | remove_uuid" diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_java.in b/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_java.in new file mode 100644 index 0000000000..06d3a6e66b --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_java.in @@ -0,0 +1,19 @@ +==== fanout_producer_dotnet.out +==== fanout_listener_java.out | remove_uuid +Listener: Setting an ExceptionListener on the connection as sample uses a MessageConsumer +Listener: Creating a non-transacted, auto-acknowledged session +Listener: Creating a MessageConsumer +Listener: Starting connection so MessageConsumer can receive messages +Listener: Received message: Message 0 +Listener: Received message: Message 1 +Listener: Received message: Message 2 +Listener: Received message: Message 3 +Listener: Received message: Message 4 +Listener: Received message: Message 5 +Listener: Received message: Message 6 +Listener: Received message: Message 7 +Listener: Received message: Message 8 +Listener: Received message: Message 9 +Listener: Received final message That's all, folks! +Listener: Closing connection +Listener: Closing JNDI context diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_python b/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_python new file mode 100644 index 0000000000..a09b26ca6a --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_python @@ -0,0 +1,11 @@ +# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify +py=$PYTHON_EXAMPLES/fanout + +fanout_producer_dotnet() +{ +mono $DOTNET_EXAMPLES/example-fanout-Producer.exe localhost 5672 +} + +background "Subscribed" $py/fanout_consumer.py +clients fanout_producer_dotnet +outputs ./fanout_producer_dotnet.out "$py/fanout_consumer.py.out | remove_uuid" diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_python.in b/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_python.in new file mode 100644 index 0000000000..e9959c2e25 --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/verify_dotnet_python.in @@ -0,0 +1,14 @@ +==== fanout_producer_dotnet.out +==== fanout_consumer.py.out | remove_uuid +Subscribed to queue +Message 0 +Message 1 +Message 2 +Message 3 +Message 4 +Message 5 +Message 6 +Message 7 +Message 8 +Message 9 +That's all, folks! diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/verify_java_dotnet b/RC9/qpid/dotnet/client-010/examples/fanout/verify_java_dotnet new file mode 100644 index 0000000000..d72954de0e --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/verify_java_dotnet @@ -0,0 +1,16 @@ +# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify + +fanout_listener_dotnet() +{ +mono $DOTNET_EXAMPLES/example-fanout-Listener.exe localhost 5672 +} + + +fanout_producer_java() +{ +java -Dlog4j.configuration=file://"$JAVA"/log4j.xml -cp "$CLASSPATH" org.apache.qpid.example.jmsexample.fanout.Producer +} + +background "Listening" fanout_listener_dotnet +clients fanout_producer_java +outputs fanout_producer_java.out "./fanout_listener_dotnet.out | remove_uuid" diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/verify_java_dotnet.in b/RC9/qpid/dotnet/client-010/examples/fanout/verify_java_dotnet.in new file mode 100644 index 0000000000..acf1b61221 --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/verify_java_dotnet.in @@ -0,0 +1,29 @@ +==== fanout_producer_java.out +Producer: Creating a non-transacted, auto-acknowledged session +Producer: Creating a Message Producer +Producer: Creating a TestMessage to send to the destination +Producer: Sending message: 1 +Producer: Sending message: 2 +Producer: Sending message: 3 +Producer: Sending message: 4 +Producer: Sending message: 5 +Producer: Sending message: 6 +Producer: Sending message: 7 +Producer: Sending message: 8 +Producer: Sending message: 9 +Producer: Sending message: 10 +Producer: Closing connection +Producer: Closing JNDI context +==== fanout_listener_dotnet.out | remove_uuid +Listening +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: Message 10 +Message: That's all, folks! diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/verify_python_dotnet b/RC9/qpid/dotnet/client-010/examples/fanout/verify_python_dotnet new file mode 100644 index 0000000000..ac472c0f72 --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/verify_python_dotnet @@ -0,0 +1,11 @@ +# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify +py=$PYTHON_EXAMPLES/fanout + +fanout_listener_dotnet() +{ +mono $DOTNET_EXAMPLES/example-fanout-Listener.exe localhost 5672 +} + +background "Listening" fanout_listener_dotnet +clients $py/fanout_producer.py +outputs $py/fanout_producer.py.out "./fanout_listener_dotnet.out | remove_uuid" diff --git a/RC9/qpid/dotnet/client-010/examples/fanout/verify_python_dotnet.in b/RC9/qpid/dotnet/client-010/examples/fanout/verify_python_dotnet.in new file mode 100644 index 0000000000..b489c63a2c --- /dev/null +++ b/RC9/qpid/dotnet/client-010/examples/fanout/verify_python_dotnet.in @@ -0,0 +1,14 @@ +==== fanout_producer.py.out +==== fanout_listener_dotnet.out | remove_uuid +Listening +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! |
