Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No message received on Flow channel #512

Open
Bedotech opened this issue Aug 3, 2021 · 1 comment
Open

No message received on Flow channel #512

Bedotech opened this issue Aug 3, 2021 · 1 comment

Comments

@Bedotech
Copy link

Bedotech commented Aug 3, 2021

Hi, thanks for your great work on AMQP implementation!
I having a problem on detect when channel enter in flow mode using RabbitMQ 3.8.15, after the channel creation i start a goroutine that check if some messages are sent from the server:

// Flow is sent to publisher channel when the Broker can't accept new messages.
notifyFlow := channel.NotifyFlow(make(chan bool))

go func() {
for {
	select {
	case flow, ok := <-notifyFlow:
		{
			if !ok {
				return
			}

			if flow {
				// On flow true resume all publishing
				publisher.lock.Unlock()
			} else {
				// On flow false stop all publishing
				publisher.lock.Lock()
			}
		}
	case <-publisher.ctx.Done():
		{
			return
		}
	}
}
}()

The channel isn't in confirm or transaction mode.
On the same channel i start publishing in loop 1 millon messages, the connection on broker side are in flow mode:

bash-5.1# rabbitmqctl list_connections
Listing connections ...
user	peer_host	peer_port	state
guest	172.20.0.1	62810	flow
bash-5.1# rabbitmqctl list_channels
Listing channels ...
pid	user	consumer_count	messages_unacknowledged
<[email protected]>	guest	0	0
bash-5.1#

but no notification is returned from the channel passed to NotifyFlow, any ideas?

@Bedotech
Copy link
Author

Bedotech commented Aug 6, 2021

Ok, maybe i get this, modern version of RabbitMQ use TCP back pressure, there is any way to detect di behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant