Hello, I am still experiencing with electron examples codes, and there is a strange behavior that I don't understand. Probably I don't understand well the protocol. If anyone has an idea ... regards, jf
sender : go build; ./send -debug -count 100 amqp://localhost:5672/topic 2020/04/15 15:52:50 Started senders, expect 100 acknowledgements ... Received all 100 acknowledgements broker: go build; ./broker -debug Listening on [::]:5672 2020/04/15 15:52:50 Accepted [0x7f7760000ec0][::1]:5672-[::1]:60138 2020/04/15 15:52:50 incoming connection: (Connection)(0x7f7760000ec0) 2020/04/15 15:52:50 incoming session: (Session)(0x7f7758000a50) 2020/04/15 15:52:50 incoming receiver-link: send[431]@1(topic<-) 2020/04/15 15:52:50 send[431]@1(topic<-): received topic0 ..... 2020/04/15 15:52:50 incoming closed: [0x7f7760000ec0][::1]:5672-[::1]:60138 2020/04/15 15:52:50 send[431]@1(topic<-) error: EOF receiver: go build; ./receive -debug -count 1 amqp://localhost:5672/topic 2020/04/15 15:53:15 Connecting to amqp://localhost:5672/topic Listening on 1 connections 2020/04/15 15:53:15 topic0 Received 1 messages 2020/04/15 15:53:15 close [0xa3e220][::1]:60140-[::1]:5672 *why the receiver hangs after closing the connection ?* borker : 2020/04/15 15:53:15 Accepted [0x1ebfef0][::1]:5672-[::1]:60140 2020/04/15 15:53:15 incoming connection: (Connection)(0x1ebfef0) 2020/04/15 15:53:15 incoming session: (Session)(0x7f7758000a50) 2020/04/15 15:53:15 incoming sender-link: receive[531]@1(topic->) 2020/04/15 15:53:15 receive[531]@1(topic->): sent topic0 2020/04/15 15:53:15 receive[531]@1(topic->): sent topic1 2020/04/15 15:53:15 receive[531]@1(topic->): sent topic2 2020/04/15 15:53:15 incoming closed: [0x1ebfef0][::1]:5672-[::1]:60140 2020/04/15 15:53:15 message topic1 put back, status unacknowledged, error EOF 2020/04/15 15:53:15 receive[531]@1(topic->) closed: EOF *the server send 3 messages while the receiver only asked 1, before it sees that the connection is closed. * is there a better way to pop up only x messages from a queue and then close the connection ?
