Hi,

Thanks a lot Robbie for these explanations, and now I understood, what happened 
😉
I will do some modifications in my code to be align with the qpid prton 
container philosophy

Regards

From: Millieret, Xavier
Sent: lundi 4 octobre 2021 10:37
To: users@qpid.apache.org
Subject: Slowness to reuse connection

Hi all,

I work on the qpid-protn 0.34 on linux Debian 11, and with mosquito broker, 
with version 2.0.10-6.
I have an issue and I don’t understand why, when I do this:

Chain send message just after an on_sender_open, it’s ok, and relatively fast

class client : public proton::messaging_handler
{

    public:

    void on_connection_open(proton::connection& con)
    {
     con.open_receiver(myAddress);
    }

    void on_sender_open(proton::sender& sender)
    {
      proton::message msg;
      req.body(“test”);
      sender.send(msg);
    }
}

And if I do the following code,
i.e.
Handle the my client object to reuse the connection, and send the message with 
this connection, every time when I want

class client : public proton::messaging_handler
{
    private:
    proton::sender m_sender;

    void on_connection_open(proton::connection& con)
    {
     con.open_receiver(myAddress);
    }

    void on_sender_open(proton::sender& s)
    {
      m_sender = s;
    }

    void send_msg()(const proton::message& msg)
    {
       m_sender.send(msg);
    }
}

It’s works, but unfortunately, with this code, it’s slower than the previous 
one (around 2seconds)

Any help to understand what’s happening, will be helpful.

Regards

Xavier Millieret



________________________________
Eaton Industries (France) S.A.S ~ Siège social: 110 Rue Blaise Pascal, Immeuble 
Le Viséo - Bâtiment A Innovallée, 38330, Montbonnot-St.-Martin, France ~ Lieu 
d'enregistrement au registre du commerce: Grenoble ~ Numéro d'enregistrement: 
509 653 176 ~ Capital social souscrit et liberé:€ 16215441 ~ Numéro de TVA: 
FR47509653176

________________________________


Reply via email to