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

proton::connection::virtual_host() is empty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 2.11.0.GA
    • amqp-cpp-client
    • None
    • False
    • None
    • False
    • Low

      In the `on_message()` method in the `simple_recv` example, add the following lines:

      std::string host = d.connection().virtual_host();
      std::cout << "Message from " << host << std::endl;

      Send a message. The hostname is empty. I have not been able to find a place in the lifecycle of a simple Proton program where this value is non-empty.

      It would be helpful in scenarios where load balancing or failover are in use, to be able to log to which broker a client is connected. I seem to recall that this was possible in earlier versions of Proton.

            kvanderr@redhat.com Kim van der Riet
            rhn-support-kboone Kevin Boone
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: