qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adel Boutros <adelbout...@live.com>
Subject RE: [qpdi-dispatch 0.6.0] No delivery settled or accepted when using proton-c 0.12.2
Date Tue, 16 Aug 2016 16:37:54 GMT
You were right. I removed the connection.close() and noticed that after some time, I am receiving
the "delivery_settle" and "delivery_accept".

> Subject: Re: [qpdi-dispatch 0.6.0] No delivery settled or accepted when using proton-c
0.12.2
> To: users@qpid.apache.org
> From: gsim@redhat.com
> Date: Tue, 16 Aug 2016 16:16:18 +0100
> 
> On 16/08/16 15:42, Adel Boutros wrote:
> > Hello,
> >
> > It seems that when a proton::container connects to a broker to send message, 2 callbacks
are called after the on_sendable sends a message "on_delivery_accept" and on_delivery_settle".
> >
> > When my container connects to the dispatch router which is in its turn connected
to a broker, I receive none of those. Although I can see my message on the broker. Is this
a known bug? Is it fixed with 0.6.1 version of the dispatch router?
> 
> Dispositions are normally relayed back to the client. I suspect the 
> issue may be that you are closing the link immediately after sending - 
> that may cause the router to think you are not interested in the 
> disposition. You could try adding a flag to indicate that you have 
> already sent the message, then delaying the closing of sender and 
> connection until the messages are confirmed.
> 
> > I activated the PN_TRACE_FRM=1 on the client-side and noticed that in the case of
the dispatch router, I do not receive the following lines:
> >
> > [000000000080FC10]:0 <- @disposition(21) [role=true, first=0, last=0, settled=true,
state=@accepted(36) []]
> > [000000000080FC10]:0 <- @detach(22) [handle=0, closed=true]
> >
> > Regards,
> > Adel
> >
> > ======
> > Code
> > ======
> > class MyHandler : public proton::handler
> > {
> >
> >    void on_start(proton::event &e)
> >    {
> >       std::cout <<"on_start"<<std::endl;
> >       proton::url m_url("MACHINE:10454");
> >       proton::connection conn = e.container().connect(m_url);
> >       conn.open_sender("perf.topic");
> >    }
> >
> >    void on_sendable(proton::event &e)
> >    {
> >       std::cout <<"on_sendable"<<std::endl;
> >       proton::sender sender = e.sender();
> >       proton::message m("Hello toto!");
> >       sender.send(m);
> >       sender.close();
> >       e.connection().close();
> >    }
> >
> >    /// The remote peer accepted an outgoing message.
> >    void on_delivery_accept(proton::event &e)
> >    {
> >       std::cout <<"on_delivery_accept"<<std::endl;
> >    }
> >    /// The remote peer rejected an outgoing message.
> >    void on_delivery_reject(proton::event &e)
> >    {
> >       std::cout <<"on_delivery_reject"<<std::endl;
> >    }
> >    /// The remote peer released an outgoing message.
> >    void on_delivery_release(proton::event &e)
> >    {
> >       std::cout <<"on_delivery_release"<<std::endl;
> >    }
> >    /// The remote peer settled an outgoing message.
> >    void on_delivery_settle(proton::event &e)
> >    {
> >       std::cout <<"on_delivery_settle"<<std::endl;
> >    }
> >
> >    void on_unhandled_error(proton::event &e, const proton::condition &c)
> >    {
> >       std::cout<<e.name()<<":" <<c.str() << std::endl;
> >    }
> >
> >    void on_transport_error(proton::event &e)
> >    {
> >       std::cout<<"on_transport_error: " << e.transport().condition().str()
<<std::endl;
> >    }
> > };
> >
> > =========
> > BROKER (PN_TRACE_FRM=1 client-side)
> > ========
> > on_start
> > [000000000080FC10]:  -> AMQP
> > [000000000080FC10]:0 -> @open(16) [container-id="092b8863-a51c-445b-846c-896f49238f6c",
hostname="MACHINE:10455", channel-max=32767]
> > [000000000080FC10]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647,
outgoing-window=2147483647]
> > [000000000080FC10]:0 -> @attach(18) [name="1/1", handle=0, role=false, snd-settle-mode=2,
rcv-settle-mode=0, source=@source(40) [durable=0, timeout=0, dynamic=false], target=@targe
> > t(41) [address="perf.topic", durable=0, timeout=0, dynamic=false], initial-delivery-count=0]
> > [000000000080FC10]:  <- AMQP
> > [000000000080FC10]:0 <- @open(16) [container-id="5c480e45-a289-4c16-947b-f352419370af",
max-frame-size=32768, channel-max=255, idle-time-out=0, properties={:product="qpid", :versio
> > n="6.0.1", :"qpid.build"="1731621", :"qpid.instance_name"="Broker"}]
> > [000000000080FC10]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=0, incoming-window=2048,
outgoing-window=2048]
> > [000000000080FC10]:0 <- @attach(18) [name="1/1", handle=0, role=true, snd-settle-mode=2,
rcv-settle-mode=0, source=@source(40) [durable=0, timeout=0, dynamic=false], target=@target
> > (41) [address="perf.topic", durable=0, timeout=0, dynamic=false]]
> > [000000000080FC10]:0 <- @flow(19) [next-incoming-id=0, incoming-window=2048,
next-outgoing-id=0, outgoing-window=2048, handle=0, delivery-count=0, link-credit=20000, echo=false]
> > on_sendable
> > [000000000080FC10]:0 -> @transfer(20) [handle=0, delivery-id=0, delivery-tag=b"\x01\x00\x00\x00\x00\x00\x00\x00",
message-format=0, settled=false, more=false] (148) "\x00Sp\xd0\x00
> > \x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00-\x00\x00\x00\x0d@@@\xa1\x0atest@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\
> > x00@\x00St\xd1\x00\x00\x004\x00\x00\x00\x04\xa1\x0ctest\xa1\x02test\xa1\x11test\xa1\x09test\x00Sw\xa1\x0bHello
toto!"
> > [000000000080FC10]:0 -> @detach(22) [handle=0, closed=true]
> > [000000000080FC10]:0 -> @close(24) []
> > on_sendable
> > [000000000080FC10]:  -> EOS
> > [000000000080FC10]:0 <- @disposition(21) [role=true, first=0, last=0, settled=true,
state=@accepted(36) []]
> > [000000000080FC10]:0 <- @detach(22) [handle=0, closed=true]
> > [000000000080FC10]:0 <- @close(24) []
> > [000000000080FC10]:  <- EOS
> > on_delivery_accept
> > on_delivery_settle
> >
> > =============
> > DISPATCH ROUTER  (PN_TRACE_FRM=1 client-side)
> > ============
> > on_start
> > [000000000068FC10]:  -> AMQP
> > [000000000068FC10]:0 -> @open(16) [container-id="915e8a02-4056-4c60-ab27-18068462d862",
hostname="MACHINE:10454", channel-max=32767]
> > [000000000068FC10]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647,
outgoing-window=2147483647]
> > [000000000068FC10]:0 -> @attach(18) [name="1/1", handle=0, role=false, snd-settle-mode=2,
rcv-settle-mode=0, source=@source(40) [durable=0, timeout=0, dynamic=false], target=@targe
> > t(41) [address="perf.topic", durable=0, timeout=0, dynamic=false], initial-delivery-count=0]
> > [000000000068FC10]:  <- AMQP
> > [000000000068FC10]:0 <- @open(16) [container-id="router.10454", max-frame-size=16384,
channel-max=32767, idle-time-out=8000, offered-capabilities=:"ANONYMOUS-RELAY", properties={:p
> > roduct="qpid-dispatch-router", :version="0.6.0"}]
> > [000000000068FC10]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=0, incoming-window=61,
outgoing-window=2147483647]
> > [000000000068FC10]:0 <- @attach(18) [name="1/1", handle=0, role=true, snd-settle-mode=2,
rcv-settle-mode=0, source=@source(40) [durable=0, timeout=0, dynamic=false], target=@target
> > (41) [address="perf.topic", durable=0, timeout=0, dynamic=false], initial-delivery-count=0]
> > [000000000068FC10]:0 <- @flow(19) [next-incoming-id=0, incoming-window=61, next-outgoing-id=0,
outgoing-window=2147483647, handle=0, delivery-count=0, link-credit=250, drain=false]
> >
> > on_sendable
> > [000000000068FC10]:0 -> @transfer(20) [handle=0, delivery-id=0, delivery-tag=b"\x01\x00\x00\x00\x00\x00\x00\x00",
message-format=0, settled=false, more=false] (148) "\x00Sp\xd0\x00
> > \x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00-\x00\x00\x00\x0d@@@\xa1\x0atest@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\
> > x00@\x00St\xd1\x00\x00\x004\x00\x00\x00\x04\xa1\x0ctest\xa1\x02test\xa1\x11test\xa1\x09test\x00Sw\xa1\x0bHello
toto!"
> > [000000000068FC10]:0 -> @detach(22) [handle=0, closed=true]
> > [000000000068FC10]:0 -> @close(24) []
> > on_sendable
> > [000000000068FC10]:  -> EOS
> > [000000000068FC10]:0 <- @close(24) []
> > [000000000068FC10]:  <- EOS
> >
> >  		 	   		
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message