I'm afraid that it's going to be very difficult to diagnose the issue here without a solid reproducer.
One approach might be to turn frame level logging on at one end of the connection or other using the PN_LOG environment variable. Set if to "frame" (PN_LOG=frame) to get an output on stderr of the AMQP frames being sent/received. If you post that here (or maybe link to pastebin/git gist) then we can see a bit more clearly what's going on at a protocol level. Are you sure that you are correctly overloading the messaging_adapter class? If you are using a different signature for on_connection_open then the overload won't work. To get the compiler to alert you use the 'override' keyword. Andrew On Tue, Mar 7, 2023 at 5:46 PM Tiaan Wessels <tiaanwess...@gmail.com> wrote: > Hi, > I am trying a direct send between two programs, one listening and upon > accepting, starts a receiver and the other connecting and should start a > sender upon connecting but the on_connection_open never gets called in the > sending program. I can see with netstat the connection is established and > my listening program gets on_accept, on_transport_open and then > on_connection_open upon which a do open_receiver whereafter i get > on_session_open and then on_receiver_open upon which i add 100 credits but > that's where the action stops. The sender only ever gets on_container_start > upon which i connect and the source code would have opened a sender in the > on_connection_open but this never gets called even though the other end and > netstat shows the connection is in fact established. A pstack on the sender > shows the run thread in epoll and select most of the time. > I removed the rpm's and downloaded 0.38.0 sources and started adding debug > prints to understand what's going on. My first venture in qpid proton > sources and all i could see that is suspect is > > void on_connection_bound(messaging_handler& handler, pn_event_t* event) { > connection c(make_wrapper(pn_event_connection(event))); > } > > which makes a connection object but does nothing with it. Call's now > handler. This is the only case in proton::messaging_adapter::dispatch which > does not fall through to default in my sending app. > It's difficult to provide a working example as the code is integrated into > a bigger app which comes with a lot of libraries and other sources. My > on_* is modeled quite closely to the examples so i suspect something in my > integration code is breaking it but i have no clue what. > My question here is, is there any suggestions how to debug this with the > qpid proton source code at hand ? Why would my on_connection_open not be > called or is it not called ? Should it have been called ? > Thanks >