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

All messages dropped when max_queued_messages 0 #2879

Closed
Daedaluz opened this issue Aug 21, 2023 · 3 comments
Closed

All messages dropped when max_queued_messages 0 #2879

Daedaluz opened this issue Aug 21, 2023 · 3 comments

Comments

@Daedaluz
Copy link
Contributor

Daedaluz commented Aug 21, 2023

mosquitto.conf:

max_queued_messages 0
allow_anonymous true
listener 1883

start mosquitto:
$ docker run --rm -ti -p 1883:1883 -v $(PWD)/mosquitto.conf:/mosquitto/config/mosquitto.conf eclipse-mosquitto:2.0.16

subscribe:
$ mosquitto_sub -v -t "#"

publish:
$ mosquitto_pub -t "hello" -m "world"


Mosquitto log:

1692604552: mosquitto version 2.0.16 starting
1692604552: Config loaded from /mosquitto/config/mosquitto.conf.
1692604552: Opening ipv4 listen socket on port 1883.
1692604552: Opening ipv6 listen socket on port 1883.
1692604552: mosquitto version 2.0.16 running
1692604552: New connection from 172.17.0.1:33904 on port 1883.
1692604552: New client connected from 172.17.0.1:33904 as auto-BBB3F4DC-A2B8-A350-CAE6-B3B99F9DAC9B (p2, c1, k60).
1692604552: Outgoing messages are being dropped for client auto-BBB3F4DC-A2B8-A350-CAE6-B3B99F9DAC9B.
1692604553: New connection from 172.17.0.1:33906 on port 1883.
1692604553: New client connected from 172.17.0.1:33906 as auto-7B07F536-BDFB-4E81-F8FB-6D973493172F (p2, c1, k60).
1692604553: Outgoing messages are being dropped for client auto-7B07F536-BDFB-4E81-F8FB-6D973493172F.

nothing on the subscriber and the pub client hangs and eventually terminates with Error: Unknown error.

@tobiasfrick
Copy link

Ran into the same issue, I think the problem was introduced with 6113eac at this line:

if(mosq->out_packet_count >= db.config->max_queued_messages){

@karlp
Copy link
Contributor

karlp commented Aug 22, 2023

Dupe of #2876

@Daedaluz
Copy link
Contributor Author

Fix'd in 2.0.17; closing

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants