Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error from version 2.4.8 #595

Open
MrSkiv opened this issue Nov 29, 2024 · 7 comments
Open

Error from version 2.4.8 #595

MrSkiv opened this issue Nov 29, 2024 · 7 comments

Comments

@MrSkiv
Copy link

MrSkiv commented Nov 29, 2024

Dotnet 9
nuget packege Amqpnetlite.Core
From version 2.4.8 (2.4.9, 2.4.10, 2.4.11) I have problems. 2.4.7 and earlier works fine.

I use this code:

    var factory = new ConnectionFactory();
    if (!string.IsNullOrEmpty(_certificateName))
    {
        factory.SSL.ClientCertificates.Add(
            CertificateHelper.GetCertificate(_certificateName, _certificateLocation));
        factory.SSL.Protocols = _certificateProtocol;
        factory.SSL.RemoteCertificateValidationCallback = RemoteCertificateValidationCallback;
        factory.SSL.CheckCertificateRevocation = false;
    }

    var address = new Address(_address);
    _connection = await factory.CreateAsync(address);
    _session = new Session(_connection);
    _logger.LogInformation("AMQP server connected. ");
    _lastMessageDate.Clear();
    for (var i = 0; i < _subscriptions.Count; i++)
    {
        var subscription = _subscriptions[i];
        var linkName = $"ReceiverLink_{i + 1}";
        var receiverLink = new ReceiverLink(_session, linkName, subscription.Queue);
        _links[receiverLink.Name] = receiverLink;

        receiverLink.Start(30, (receiver, message) =>
        {
            _ = OnMessageReceivedAsync(receiver, message);
        });
        _lastMessageDate[receiverLink.Name] = DateTime.Now;
        _logger.LogInformation($"Receiver link {receiverLink.Name} started. ");
    }

As you can see, nothing special. Sometimes I get some messages, but when I close receiverlink await link.CloseAsync(), I suddenly receive bunch of messages, which I should received earlier. Looks like that messages is stuck somewhere.

About broker, I can't say nothing specific - it is third party, and they states that it supports AMQP 1.0.

@xinchen10
Copy link
Member

Is it possible to capture Frame level logs and share it here? If you use SASL PLAIN authentication, please remove the SASL frames.
https://github.com/Azure/amqpnetlite/blob/master/docs/articles/tracing.md

@MrSkiv
Copy link
Author

MrSkiv commented Dec 3, 2024

[11:22:30.060] SEND AMQP 0 1.0.0
[11:22:30.070] SEND (ch=0) open(container-id:AMQPNetLite-8459aa46,host-name:<DELETED_SERVER_ADDRESS>,max-frame-size:262144,channel-max:255)
[11:22:30.100] RECV AMQP 0 1 0 0
[11:22:30.109] RECV (ch=0) open(container-id:v:solot11,max-frame-size:68157440,channel-max:255,offered-capabilities:[ANONYMOUS-RELAY,sole-connection-for-container,SHARED-SUBS,APACHE.ORG:NO_LOCAL,APACHE.ORG:SELECTOR],properties:[topic-prefix:topic://,queue-prefix:queue://,platform:Solace PubSub+ 3560,version:10.4.1.189])
[11:22:30.114] SEND (ch=0) begin(next-outgoing-id:4294967293,incoming-window:2048,outgoing-window:2048,handle-max:1023)
[11:22:30.119] SEND (ch=0) attach(name:ReceiverLink_1,handle:0,role:True,source:source(address:<DELETED_QUEUE_NAME>),target:target())
[11:22:30.123] SEND (ch=0) flow(in-window:2048,next-out-id:4294967293,out-window:2048,handle:0,link-credit:30,drain:False)

<HERE MY ACTION: when I didn't receive any messages, I pressed any key in console app and closing method is called: method is closing receiverlink, session, connection. From this moment I started to receive messages from server which are waiting on the server from the beginning. These messages should be received earlier, from start. In version AMQPNETLITE 2.4.7 - this works as intended. >

[11:22:59.224] SEND (ch=0) detach(handle:0,closed:True)
[11:22:59.229] RECV (ch=1) begin(remote-channel:0,next-outgoing-id:1,incoming-window:2147483647,outgoing-window:2147483647,handle-max:575)
[11:22:59.238] RECV (ch=1) attach(name:ReceiverLink_1,handle:1,role:False,snd-settle-mode:Unsettled,rcv-settle-mode:First,source:source(address:<DELETED_QUEUE_NAME>,durable:0,expiry-policy:session-end,timeout:0,dynamic:False,default-outcome:released(),outcomes:[amqp:accepted:list,amqp:rejected:list,amqp:released:list],capabilities:[queue]),target:target(),incomplete-unsettled:False,initial-delivery-count:0,max-message-size:30001024)
[11:22:59.252] RECV (ch=1) transfer(handle:1,delivery-id:0,delivery-tag:0000000000000001,message-format:0,more:False) payload 1004
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:22:59.427] RECV (ch=1) transfer(handle:1,delivery-id:1,delivery-tag:0000000000000002,message-format:0,more:False) payload 1004
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:22:59.537] RECV (ch=1) transfer(handle:1,delivery-id:2,delivery-tag:0000000000000003,message-format:0,more:False) payload 1004
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:22:59.663] RECV (ch=1) transfer(handle:1,delivery-id:3,delivery-tag:0000000000000004,message-format:0,more:False) payload 2608
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:00.380] RECV (ch=1) transfer(handle:1,delivery-id:4,delivery-tag:0000000000000005,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:00.555] RECV (ch=1) transfer(handle:1,delivery-id:5,delivery-tag:0000000000000006,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:00.645] RECV (ch=1) transfer(handle:1,delivery-id:6,delivery-tag:0000000000000007,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:00.790] RECV (ch=1) transfer(handle:1,delivery-id:7,delivery-tag:0000000000000008,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:00.915] RECV (ch=1) transfer(handle:1,delivery-id:8,delivery-tag:0000000000000009,message-format:0,more:False) payload 2728
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:01.046] RECV (ch=1) transfer(handle:1,delivery-id:9,delivery-tag:000000000000000A,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:01.125] RECV (ch=1) transfer(handle:1,delivery-id:10,delivery-tag:000000000000000B,message-format:0,more:False) payload 2495
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:01.215] RECV (ch=1) transfer(handle:1,delivery-id:11,delivery-tag:000000000000000C,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:01.323] RECV (ch=1) transfer(handle:1,delivery-id:12,delivery-tag:000000000000000D,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:01.420] RECV (ch=1) transfer(handle:1,delivery-id:13,delivery-tag:000000000000000E,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:01.515] RECV (ch=1) transfer(handle:1,delivery-id:14,delivery-tag:000000000000000F,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:01.604] RECV (ch=1) transfer(handle:1,delivery-id:15,delivery-tag:0000000000000010,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:01.688] RECV (ch=1) transfer(handle:1,delivery-id:16,delivery-tag:0000000000000011,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:01.762] RECV (ch=1) transfer(handle:1,delivery-id:17,delivery-tag:0000000000000012,message-format:0,more:False) payload 2482
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:01.837] RECV (ch=1) transfer(handle:1,delivery-id:18,delivery-tag:0000000000000013,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:01.905] RECV (ch=1) transfer(handle:1,delivery-id:19,delivery-tag:0000000000000014,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:01.981] RECV (ch=1) transfer(handle:1,delivery-id:20,delivery-tag:0000000000000015,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:02.053] RECV (ch=1) transfer(handle:1,delivery-id:21,delivery-tag:0000000000000016,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:02.134] RECV (ch=1) transfer(handle:1,delivery-id:22,delivery-tag:0000000000000017,message-format:0,more:False) payload 998
Exception thrown: 'Amqp.AmqpException' in Amqp.Net.dll
[11:23:02.210] RECV (ch=1) detach(handle:1,closed:True)
[11:23:02.214] SEND (ch=0) end()
[11:23:02.250] RECV (ch=1) end()
[11:23:02.253] SEND (ch=0) close()
[11:23:02.289] RECV (ch=0) close()
The program '[28060] ConsoleApp2.exe: Program Trace' has exited with code 0 (0x0).
The program '[28060] ConsoleApp2.exe' has exited with code 0 (0x0).

I also checked, what is AmpqException: Operation 'Accept' is invalid, under state DetachSent.

@MrSkiv
Copy link
Author

MrSkiv commented Dec 3, 2024

For example same with version 2.4.0 (I'm not sure from which version problem appears. I wrote before that version 2.4.7 is ok, but no, last version which works for me 2.4.6. )

[11:47:33.203] SEND AMQP 0 1.0.0
[11:47:33.209] SEND (ch=0) open(container-id:AMQPNetLite-6bb0aab7,host-name:<DELETED_SERVER_ADDRESS>,max-frame-size:262144,channel-max:255,idle-time-out:2147483647)
[11:47:33.218] SEND (ch=0) begin(remote-channel:0,next-outgoing-id:4294967293,incoming-window:2048,outgoing-window:2048,handle-max:63)
[11:47:33.224] SEND (ch=0) attach(name:ReceiverLink_1,handle:0,role:True,snd-settle-mode:Unsettled,rcv-settle-mode:First,source:source(address:<DELETED_QUEUE_NAME>,durable:0,timeout:0,dynamic:False),target:target(durable:0,timeout:0,dynamic:False),incomplete-unsettled:False,initial-delivery-count:0,max-message-size:0)
[11:47:33.228] SEND (ch=0) flow(next-in-id:0,in-window:2048,next-out-id:4294967293,out-window:2048,handle:0,delivery-count:0,link-credit:30,available:0,drain:False,echo:False)
[11:47:33.241] RECV AMQP 0 1 0 0
[11:47:33.246] RECV (ch=0) open(container-id:v:solot11,max-frame-size:68157440,channel-max:255,idle-time-out:0,offered-capabilities:[ANONYMOUS-RELAY,sole-connection-for-container,SHARED-SUBS,APACHE.ORG:NO_LOCAL,APACHE.ORG:SELECTOR],properties:[topic-prefix:topic://,queue-prefix:queue://,platform:Solace PubSub+ 3560,version:10.4.1.189])
[11:47:33.252] RECV (ch=1) begin(remote-channel:0,next-outgoing-id:1,incoming-window:2147483647,outgoing-window:2147483647,handle-max:63)
[11:47:33.261] RECV (ch=1) attach(name:ReceiverLink_1,handle:1,role:False,snd-settle-mode:Unsettled,rcv-settle-mode:First,source:source(address:<DELETED_QUEUE_NAME>,durable:0,expiry-policy:session-end,timeout:0,dynamic:False,default-outcome:released(),outcomes:[amqp:accepted:list,amqp:rejected:list,amqp:released:list],capabilities:[queue]),target:target(durable:0,timeout:0,dynamic:False),incomplete-unsettled:False,initial-delivery-count:0,max-message-size:30001024)
[11:47:33.266] RECV (ch=1) transfer(handle:1,delivery-id:0,delivery-tag:0000000000000001,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.311] SEND (ch=0) disposition(role:True,first:0,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.366] RECV (ch=1) transfer(handle:1,delivery-id:1,delivery-tag:0000000000000002,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.368] SEND (ch=0) disposition(role:True,first:1,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.370] RECV (ch=1) transfer(handle:1,delivery-id:2,delivery-tag:0000000000000003,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.372] SEND (ch=0) disposition(role:True,first:2,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.373] RECV (ch=1) transfer(handle:1,delivery-id:3,delivery-tag:0000000000000004,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 2614
[11:47:33.694] SEND (ch=0) disposition(role:True,first:3,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.698] RECV (ch=1) transfer(handle:1,delivery-id:4,delivery-tag:0000000000000005,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.700] SEND (ch=0) disposition(role:True,first:4,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.702] RECV (ch=1) transfer(handle:1,delivery-id:5,delivery-tag:0000000000000006,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.705] SEND (ch=0) disposition(role:True,first:5,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.707] RECV (ch=1) transfer(handle:1,delivery-id:6,delivery-tag:0000000000000007,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.711] SEND (ch=0) disposition(role:True,first:6,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.713] RECV (ch=1) transfer(handle:1,delivery-id:7,delivery-tag:0000000000000008,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.716] SEND (ch=0) disposition(role:True,first:7,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.718] RECV (ch=1) transfer(handle:1,delivery-id:8,delivery-tag:0000000000000009,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 2734
[11:47:33.725] SEND (ch=0) disposition(role:True,first:8,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.729] RECV (ch=1) transfer(handle:1,delivery-id:9,delivery-tag:000000000000000A,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.732] SEND (ch=0) disposition(role:True,first:9,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.735] RECV (ch=1) transfer(handle:1,delivery-id:10,delivery-tag:000000000000000B,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 2501
[11:47:33.742] SEND (ch=0) disposition(role:True,first:10,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.744] RECV (ch=1) transfer(handle:1,delivery-id:11,delivery-tag:000000000000000C,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.747] SEND (ch=0) disposition(role:True,first:11,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.749] RECV (ch=1) transfer(handle:1,delivery-id:12,delivery-tag:000000000000000D,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.751] SEND (ch=0) disposition(role:True,first:12,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.753] RECV (ch=1) transfer(handle:1,delivery-id:13,delivery-tag:000000000000000E,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.755] SEND (ch=0) disposition(role:True,first:13,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.757] RECV (ch=1) transfer(handle:1,delivery-id:14,delivery-tag:000000000000000F,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.759] SEND (ch=0) disposition(role:True,first:14,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.761] SEND (ch=0) flow(next-in-id:16,in-window:2048,next-out-id:4294967293,out-window:2147483647,handle:0,delivery-count:15,link-credit:30,available:0,drain:False,echo:False)
[11:47:33.763] RECV (ch=1) transfer(handle:1,delivery-id:15,delivery-tag:0000000000000010,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.765] SEND (ch=0) disposition(role:True,first:15,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.767] RECV (ch=1) transfer(handle:1,delivery-id:16,delivery-tag:0000000000000011,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.769] SEND (ch=0) disposition(role:True,first:16,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.772] RECV (ch=1) transfer(handle:1,delivery-id:17,delivery-tag:0000000000000012,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 2488
[11:47:33.778] SEND (ch=0) disposition(role:True,first:17,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.780] RECV (ch=1) transfer(handle:1,delivery-id:18,delivery-tag:0000000000000013,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.782] SEND (ch=0) disposition(role:True,first:18,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.784] RECV (ch=1) transfer(handle:1,delivery-id:19,delivery-tag:0000000000000014,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.786] SEND (ch=0) disposition(role:True,first:19,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.788] RECV (ch=1) transfer(handle:1,delivery-id:20,delivery-tag:0000000000000015,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.790] SEND (ch=0) disposition(role:True,first:20,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.792] RECV (ch=1) transfer(handle:1,delivery-id:21,delivery-tag:0000000000000016,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.794] SEND (ch=0) disposition(role:True,first:21,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.795] RECV (ch=1) transfer(handle:1,delivery-id:22,delivery-tag:0000000000000017,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.798] SEND (ch=0) disposition(role:True,first:22,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.800] RECV (ch=1) transfer(handle:1,delivery-id:23,delivery-tag:0000000000000018,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.805] SEND (ch=0) disposition(role:True,first:23,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.809] RECV (ch=1) transfer(handle:1,delivery-id:24,delivery-tag:0000000000000019,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.812] SEND (ch=0) disposition(role:True,first:24,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.813] RECV (ch=1) transfer(handle:1,delivery-id:25,delivery-tag:000000000000001A,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.816] SEND (ch=0) disposition(role:True,first:25,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.818] RECV (ch=1) transfer(handle:1,delivery-id:26,delivery-tag:000000000000001B,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.820] SEND (ch=0) disposition(role:True,first:26,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.822] RECV (ch=1) transfer(handle:1,delivery-id:27,delivery-tag:000000000000001C,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.823] SEND (ch=0) disposition(role:True,first:27,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.825] RECV (ch=1) transfer(handle:1,delivery-id:28,delivery-tag:000000000000001D,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.827] SEND (ch=0) disposition(role:True,first:28,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.829] RECV (ch=1) transfer(handle:1,delivery-id:29,delivery-tag:000000000000001E,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.832] SEND (ch=0) disposition(role:True,first:29,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.835] SEND (ch=0) flow(next-in-id:31,in-window:2048,next-out-id:4294967293,out-window:2147483647,handle:0,delivery-count:30,link-credit:30,available:0,drain:False,echo:False)
[11:47:33.837] RECV (ch=1) transfer(handle:1,delivery-id:30,delivery-tag:000000000000001F,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 1004
[11:47:33.841] SEND (ch=0) disposition(role:True,first:30,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.843] RECV (ch=1) transfer(handle:1,delivery-id:31,delivery-tag:0000000000000020,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.846] SEND (ch=0) disposition(role:True,first:31,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.848] RECV (ch=1) transfer(handle:1,delivery-id:32,delivery-tag:0000000000000021,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.850] SEND (ch=0) disposition(role:True,first:32,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.852] RECV (ch=1) transfer(handle:1,delivery-id:33,delivery-tag:0000000000000022,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 2662
[11:47:33.864] SEND (ch=0) disposition(role:True,first:33,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.866] RECV (ch=1) transfer(handle:1,delivery-id:34,delivery-tag:0000000000000023,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.867] SEND (ch=0) disposition(role:True,first:34,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.869] RECV (ch=1) transfer(handle:1,delivery-id:35,delivery-tag:0000000000000024,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.870] SEND (ch=0) disposition(role:True,first:35,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.872] RECV (ch=1) transfer(handle:1,delivery-id:36,delivery-tag:0000000000000025,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.873] SEND (ch=0) disposition(role:True,first:36,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.875] RECV (ch=1) transfer(handle:1,delivery-id:37,delivery-tag:0000000000000026,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.877] SEND (ch=0) disposition(role:True,first:37,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.878] RECV (ch=1) transfer(handle:1,delivery-id:38,delivery-tag:0000000000000027,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.880] SEND (ch=0) disposition(role:True,first:38,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.881] RECV (ch=1) transfer(handle:1,delivery-id:39,delivery-tag:0000000000000028,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.883] SEND (ch=0) disposition(role:True,first:39,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.884] RECV (ch=1) transfer(handle:1,delivery-id:40,delivery-tag:0000000000000029,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.886] SEND (ch=0) disposition(role:True,first:40,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.887] RECV (ch=1) transfer(handle:1,delivery-id:41,delivery-tag:000000000000002A,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.889] SEND (ch=0) disposition(role:True,first:41,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.890] RECV (ch=1) transfer(handle:1,delivery-id:42,delivery-tag:000000000000002B,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.892] SEND (ch=0) disposition(role:True,first:42,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.893] RECV (ch=1) transfer(handle:1,delivery-id:43,delivery-tag:000000000000002C,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.895] SEND (ch=0) disposition(role:True,first:43,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.897] RECV (ch=1) transfer(handle:1,delivery-id:44,delivery-tag:000000000000002D,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.898] SEND (ch=0) disposition(role:True,first:44,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.900] SEND (ch=0) flow(next-in-id:46,in-window:2048,next-out-id:4294967293,out-window:2147483647,handle:0,delivery-count:45,link-credit:30,available:0,drain:False,echo:False)
[11:47:33.901] RECV (ch=1) transfer(handle:1,delivery-id:45,delivery-tag:000000000000002E,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.903] SEND (ch=0) disposition(role:True,first:45,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.904] RECV (ch=1) transfer(handle:1,delivery-id:46,delivery-tag:000000000000002F,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.906] SEND (ch=0) disposition(role:True,first:46,last:0,settled:True,state:accepted(),batchable:False)
[11:47:33.907] RECV (ch=1) transfer(handle:1,delivery-id:47,delivery-tag:0000000000000030,message-format:0,settled:False,more:False,rcv-settle-mode:First,resume:False,aborted:False,batchable:False) payload 998
[11:47:33.909] SEND (ch=0) disposition(role:True,first:47,last:0,settled:True,state:accepted(),batchable:False)
[11:47:38.497] SEND (ch=0) detach(handle:0,closed:True)
[11:47:38.531] RECV (ch=1) detach(handle:1,closed:True)
[11:47:38.535] SEND (ch=0) end()
[11:47:38.572] RECV (ch=1) end()
[11:47:38.576] SEND (ch=0) close()
[11:47:38.611] RECV (ch=0) close()
The program '[16884] ConsoleApp2.exe: Program Trace' has exited with code 0 (0x0).
The program '[16884] ConsoleApp2.exe' has exited with code 0 (0x0).

@xinchen10
Copy link
Member

From the log it was an issue with the broker. It did not respond to the client's session/link initiation commands.
Looks like the broker is from Apache, either Broker-J or ActiveMQ. I tested your code with the latest release of both and it worked just fine.

@MrSkiv
Copy link
Author

MrSkiv commented Dec 4, 2024

platform:Solace PubSub+ 3560,version:10.4.1.189
I think that there is used Solace PubSub+ Event Broker. I have no control and knowledge of server/broker side, I'm only client - so I can only guess. Service, which they provide, is critical importance for some parties.

At the moment I use Amqpnetlite 2.4.6 version and it is working ok.

@xinchen10
Copy link
Member

The working version # 2.4.6 helped. I believe it was a regression in 2.4.7. In your code there should be a blocking call after the for loop (probably waiting for exit signal from console?). As a workaround, you can add a Task.Yield() call after connection creation. We will fix the bug soon.

    var address = new Address(_address);
    _connection = await factory.CreateAsync(address);
   await Task.Yield();
    _session = new Session(_connection);

@MrSkiv
Copy link
Author

MrSkiv commented Dec 5, 2024

Yes, Task.Yield() helps. And yes - I use Console.ReadKey.

xinchen10 added a commit that referenced this issue Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants