Uploaded image for project: 'AMQ Clients'
  1. AMQ Clients
  2. ENTMQCL-1821

[.NET] ReconnectSender example fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • None
    • amqp-dotnet-client
    • None
    • Yorba, Anza, Balboa

      When I try ReconnectSender example in .Net core client examples with default settings it ends up looping and never sends a message:

      dotnet run -- amqp://127.0.0.1:5672/service_queue,amqp://127.0.0.1:15672/service_queue 10
      [12:00:27.226] Attempting connection to  127.0.0.1:5672
      [12:00:27.284] Success: connecting to 127.0.0.1:5672
      [12:00:27.390] Event: OnOpened
      [12:00:27.417] Connection closed with no error
      [12:00:37.252] Timeout waiting for connection
      [12:00:37.252] Entering Reconnect()
      [12:00:37.252] Attempting connection to  127.0.0.1:15672
      [12:00:37.263] Failure: exception connecting to '127.0.0.1:15672': Connection refused
      [12:00:47.253] Timeout waiting for connection
      [12:00:47.253] Entering Reconnect()
      [12:00:47.253] Attempting connection to  127.0.0.1:5672
      [12:00:47.254] Success: connecting to 127.0.0.1:5672
      [12:00:47.259] Event: OnOpened
      [12:00:47.259] Connection closed with no error
      ...
      

      I tried it also with the URIs switched and that ends up with exception:

      dotnet run -- amqp://127.0.0.1:15672/service_queue,amqp://127.0.0.1:5672/service_queue 10
      [12:01:08.546] Attempting connection to  127.0.0.1:15672
      [12:01:08.593] Failure: exception connecting to '127.0.0.1:15672': Connection refused
      [12:01:18.573] Timeout waiting for connection
      [12:01:18.574] Entering Reconnect()
      [12:01:18.574] Attempting connection to  127.0.0.1:5672
      [12:01:18.608] Event: OnOpened
      [12:01:18.627] Exception occurred: System.NullReferenceException: Object reference not set to an instance of an object.
         at Amqp.Session..ctor(Connection connection, Begin begin, OnBegin onBegin)
         at ReconnectSender.Application.onOpened(IConnection _, Open __) in /root/amq-dotnet-2.5.0-core-sdk/examples/ReconnectSender/ReconnectSender.cs:line 142
         at Amqp.Connection.OnOpen(Open open)
         at Amqp.Connection.OnFrame(ByteBuffer buffer)
      [12:01:18.630] Success: connecting to 127.0.0.1:5672
      [12:01:18.631] Connection closed with error: error(condition:amqp:internal-error,description:Object reference not set to an instance of an object.)
      [12:01:28.574] Timeout waiting for connection
      [12:01:28.574] Entering Reconnect()
      [12:01:28.574] Attempting connection to  127.0.0.1:15672
      ...
      

            iboverma Irina Boverman
            dstuchli Dominik Stuchlík (Inactive)
            Dominik Stuchlík Dominik Stuchlík (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: