ryanwei created PROTON-2833:
-------------------------------
Summary: Qpid Broker Not Auto Delete Exchange Created
Corresponding Queue
Key: PROTON-2833
URL: https://issues.apache.org/jira/browse/PROTON-2833
Project: Qpid Proton
Issue Type: Bug
Components: proton-dotnet
Affects Versions: proton-dotnet-1.0.0-M10
Environment: centos7.9 C++ Broker 1.39.0
Reporter: ryanwei
Assignee: Timothy A. Bish
Attachments: ConsoleApp2.csproj, Program.cs
using using Apache.Qpid.Proton.Client create Receiver connect to C++ Broker,
After close connection, C++ Broker did not auto delete auto created queue
(Receiver connected Exchange Address Created Queue)
Steps to reproduce:
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 dotnot receive to receive message,C# code snippet
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 !!");
test code has attaced
3)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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]