ryanwei created QPID-8673: ----------------------------- Summary: Qpid Broker Not Auto Delete Exchange Created Corresponding Queue Key: QPID-8673 URL: https://issues.apache.org/jira/browse/QPID-8673 Project: Qpid Issue Type: Bug Components: C++ Broker Affects Versions: qpid-cpp-1.39.0 Environment: Centos7.9 C++ Broker 1.39.0 window 11 dotnet proton 1.0.0-M9 Reporter: ryanwei Attachments: ConsoleApp2.csproj, Program.cs
we using Proton(DotNet) api create Receiver connect to C++ Broker, After close connection, C++ Broker did not delete queue which auto created by Exchange Address. Steps to reproduce: C++ Broker create test exchange first, command: qpid-config -b localhost:6656 add exchange topic ryan_test3_ex --durable qpid-config -b localhost:6656 exchanges show follow exchagnes Type Exchange Name Attributes ================================================== direct --replicate=none direct amq.direct --durable --replicate=none fanout amq.fanout --durable --replicate=none headers amq.match --durable --replicate=none topic amq.topic --durable --replicate=none direct qmf.default.direct --replicate=none topic qmf.default.topic --replicate=none topic qpid.management --replicate=none topic ryan_test3_ex --durable 1) centos: qpid-config -b localhost:6656 queues Show following: Queue Name Attributes ============================================================================================================================= 038154c3-daf7-4fad-ad45-4eef738bccba:0.0 auto-del excl ID:02eafb79-b51e-4fef-b242-f86d453debb1:1:1_receiver-ID:02eafb79-b51e-4fef-b242-f86d453debb1:1:1:1:1 ID:f78b1699-d494-4f43-8413-d1e7e00e20fa:1:1_receiver-ID:f78b1699-d494-4f43-8413-d1e7e00e20fa:1:1:1:1 excl 2) run window dotnet receive to receive message,C# code snippet private static readonly int MessageCount = 5; static void Main(string[] args) { string serverHost = Environment.GetEnvironmentVariable("HOST") ?? "192.168.1.34"; int serverPort = Convert.ToInt32(Environment.GetEnvironmentVariable("PORT") ?? "6656"); string address = Environment.GetEnvironmentVariable("ADDRESS") ?? "ryan_test3_ex"; IClient client = IClient.Create(); ConnectionOptions options = new ConnectionOptions(); //options.User = Environment.GetEnvironmentVariable("USER"); //options.Password = Environment.GetEnvironmentVariable("PASSWORD"); using IConnection connection = client.Connect(serverHost, serverPort, options); using IReceiver receiver = connection.OpenReceiver(address); for (int i = 0; i < MessageCount; ++i) { IDelivery delivery = receiver.Receive(); IMessage<object> received = delivery.Message(); string contenttype = received.ContentType; if (string.IsNullOrEmpty(contenttype)) { if (received.HasProperty("content-type")) { contenttype = received.GetProperty("content-type") as string; Console.WriteLine("Received message with content-type: " + contenttype); } } Console.WriteLine("Received message tpye:[" + contenttype + "] BodyType:[" + received.Body.GetType() + "]"); if(contenttype == "amqp/map") { Dictionary<object, object> content = received.Body as Dictionary<object, object>; if (content != null) { foreach (KeyValuePair<object, object> entry in content) { Console.WriteLine(" Key: " + entry.Key as string + ", Value: " + entry.Value as string); //Console.WriteLine(" Key: " + (entry.Key as string) + ", Value: " + (Int64)entry.Value); } } } else if (contenttype == "text/plain") { Console.WriteLine(" Received Message : " + Encoding.UTF8.GetString(received.Body as Byte[])); } else { } } connection.Close(); Console.WriteLine(" Connection close OK !!"); dotnet proton test code has attached. 3) using test tool spout send 5 messages. spout --b localhost:6656 ryan_test3_ex -P MsgType="2" -S aa.34 -M UserID=111111 -M InvestorID=18080095 -c 5 4) DotNet Proton receiver got 5 message and exist successful. 5)Centos run: qpid-config -b localhost:6656 queues qpid-config -b localhost:6656 queues Queue Name Attributes ============================================================================================================================= 038154c3-daf7-4fad-ad45-4eef738bccba:0.0 auto-del excl ID:02eafb79-b51e-4fef-b242-f86d453debb1:1:1_receiver-ID:02eafb79-b51e-4fef-b242-f86d453debb1:1:1:1:1 ID:f78b1699-d494-4f43-8413-d1e7e00e20fa:1:1_receiver-ID:f78b1699-d494-4f43-8413-d1e7e00e20fa:1:1:1:1 excl ID:ff934946-f75f-49e2-bef6-ecd56fc9c979:1:1_receiver-ID:ff934946-f75f-49e2-bef6-ecd56fc9c979:1:1:1:1 queue: ID:ff934946-f75f-49e2-bef6-ecd56fc9c979:1:1_receiver-ID:ff934946-f75f-49e2-bef6-ecd56fc9c979:1:1:1:1 would not auto delete we using qpid tool: spout send message, drain receive message, is ok. we also reported a issue for proton: https://issues.apache.org/jira/browse/PROTON-2833 -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org